Uploaded image for project: 'Solr'
  1. Solr
  2. SOLR-1878

RelaxQueryComponent - A new SearchComponent that relaxes the main query in a semiautomatic way

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Reopened
    • Minor
    • Resolution: Unresolved
    • 1.4
    • None
    • None

    Description

      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:

      rent:[* TO 1500] AND bedroom:[2 TO *] AND floor:[100 TO *]
      

      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:

      rent:[* TO 1700] AND bedroom:[2 TO *] AND floor:[100 TO *]
      

      or:

      rent:[* TO 1500] AND bedroom:[2 TO *] AND floor:[90 TO *]
      

      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.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              koji Koji Sekiguchi
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated: