lucene-solr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Smiley (JIRA)" <>
Subject [jira] Commented: (SOLR-1878) RelaxQueryComponent - A new SearchComponent that relaxes the main query in a semiautomatic way
Date Mon, 12 Apr 2010 03:43:40 GMT


David Smiley commented on SOLR-1878:

I've implemented what I call my "FallbackRequestHandler" which tries a series of requests
until results are found.  The differentiating factor is the query parser used for which I
made several, all extending dismax but modifies the query to be a starts-with style (last
word gets an asterisk appended) or if a single word then a fuzzy search is performed.  I'm
not sure how a search component could do the fallback but I see how a request handler could
(since that's what I did).

> RelaxQueryComponent - A new SearchComponent that relaxes the main query in a semiautomatic
> ----------------------------------------------------------------------------------------------
>                 Key: SOLR-1878
>                 URL:
>             Project: Solr
>          Issue Type: New Feature
>          Components: SearchComponents - other
>    Affects Versions: 1.4
>            Reporter: Koji Sekiguchi
>            Priority: Minor
> I have the following use case:
> Imagine that you visit a web page for searching an apartment for rent. You choose parameters,
usually mark check boxes and this makes AND queries:
> {code}
> rent:[* TO 1500] AND bedroom:[2 TO *] AND floor:[100 TO *]
> {code}
> If the conditions are too tight, Solr may return few or zero leasehold properties. Because
the things is not good for the site visitors and also owners, the owner may want to recommend
the visitors to relax the conditions something like:
> {code}
> rent:[* TO 1700] AND bedroom:[2 TO *] AND floor:[100 TO *]
> {code}
> or:
> {code}
> rent:[* TO 1500] AND bedroom:[2 TO *] AND floor:[90 TO *]
> {code}
> And if the relaxed query get more numFound than original, the web page can provide a
link with a comment "if you can pay additional $100, ${numFound} properties will be found!".
> Today, I need to implement Solr client for this scenario, but this way makes two round
trips for showing one page and consistency problem (and laborious of course!).
> I'm thinking a new SearchComponent that can be used with QueryComponent. It does search
when numFound of the main query is less than a threshold. Clients can specify via request
parameters how the query can be relaxed.

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
For more information on JIRA, see:


View raw message