Bick
Bick

Reputation: 18511

filter query result by user

I want to restrict the returned results to be only the documents that were created by the user.
I then load to the index the createdBy attribute and set it to index false,stored="true"

<field name="CreatedBy" type="string" indexed="false" stored="true" required="true"/>

then in the I want to filter by "CreatedBy" so I use the dashboard, check edismax and add I check edismax and add CreatedBy:user1 to the qf field.

the result query is

http://....:8983/solr/vault/select?q=*%3A*&defType=edismax&qf=CreatedBy%3Auser1

Nothing is filtered. all rows returned.
What was I doing wrong?

Upvotes: 0

Views: 51

Answers (1)

Fuxi
Fuxi

Reputation: 5488

Try:

fq=CreatedBy:user1

qf stands for Query Fields, while fq stands for Filter Query

Upvotes: 1

Related Questions