On Jan 11, 2009, at 10:08 PM, Mike Shredder wrote:
Hi ,
I'm new to Solr .. I've been able to get Solr up & running. But
got
some quick questions.
1) How do I filter results based on permissions from an external
database
system ?
--> Should I implement a queryfilter which will look up
permissions
in the DB for permissions on each doc returned .
--> Or should I handle this in a request handler ?
I have one project that has permissions in a db. What I do is index
the permissions group ids along with the documents, so that I can use
a simple query parameter appended to the users' search strings. The
only drawback is that when the permissions change, the documents must
be (entirely) reindexed, which can be a pain (like when one change
effects half your index), but it's a small price to pay for the speed
improvements vs. constantly querying the database.
2) I need to support sub-documents & documents. So I was planning
to make
my sub-documents as Solr docs. But depending on query types I need
to dup
out sub-documents and return only one document for all sub-docs in a
result
set. Which interface to I needs to implement to achieve this ?
Check out SOLR-236. I'm using it for this purpose (using the ivan-3
patch). Works well for me although faceting can be a bit strange.
https://issues.apache.org/jira/browse/SOLR-236
3) if I do duping , my total result count will be off , what is the
right way to return an estimated total doc count ...
The doc count returned from solr-236 would be accurate, just the facet
counts are off.
--
Steve