You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by solr nps <so...@gmail.com> on 2011/07/13 21:57:44 UTC

extending edismax?

I am using Solr 3.3. I am using the edismax query parser and I am getting
great results. To improve relevancy I want to add some semantic filters to
the query.

E.g. I want to pass the query "red shoes" as q="shoes"&fq=color:red. I have
a service that can tell me that in the phrase "red shoes" the word red is
the color.

My question is where should I invoke this external service,

1) should my search client call the service, form the request and then call
Solr or
2) should I pass the query as is to Solr and have Solr call the service
internally.


1 is easier for me as I am familiar with the client code, 2 would be harder.
I wanted to know what the best practices are.

I am happy with edismax so I want to reuse all its functionality, so can I
write a custom handler that calls my service and then hands the request over
to edismax?

Thanks for your time.

Re: extending edismax?

Posted by Chris Hostetter <ho...@fucit.org>.
: E.g. I want to pass the query "red shoes" as q="shoes"&fq=color:red. I have
: a service that can tell me that in the phrase "red shoes" the word red is
: the color.
: 
: My question is where should I invoke this external service,
: 
: 1) should my search client call the service, form the request and then call
: Solr or
: 2) should I pass the query as is to Solr and have Solr call the service
: internally.

: 1 is easier for me as I am familiar with the client code, 2 would be harder.
: I wanted to know what the best practices are.

I would go with what you are comfortable with.  This isn't the typoe of 
thing where the nature of hte problem makes it more efficinet to solve in 
one particular place, and the best place to deal with it on the server 
side would be as a query parser, but subclassing edismax isn't exactly 
straight forward.


-Hoss