lucenenet-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Omri Suissa <omri.sui...@diffdoof.com>
Subject Lucene results filtering best practices
Date Sun, 25 Nov 2012 08:32:09 GMT
Hi all,

All the docs in my index have a field named "groupId" to enable filtering
the search results by the user's groups. Each user have several groups
(around 20-100 in average).

Now I have 2 implementation options:

1)      Add to the query 20-100 terms (with OR) of each user group (for
example: "content:cat AND (groupId:4 OR groupId:58 OR groupId:94 … OR
groupId:N)")

2)      Search only the user's query and create a collector (I already have
one) that filters the results before scoring (get all the groupId's of the
docs and score and add only if exists in the user's group list).

Regardless the time and effort of the implementation, what is better (and
why)?



Thanks,

Omri

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message