Hey Gnanam,

1. If I understand correctly you just need to perform one query. Like so (translated to propper syntax of course): ("SQL Server" OR SQL) OR ("Visual Basic" OR VB.NET) OR (Java AND JavaScript) 2. Every query you perform with Solr returns the 'results' count, if you ONLY want the results count simply set rows to 0 (but im guessing you will want both the results and the count as to avoid 2 trips). - The 'results count' is here: <result name="response" numFound="0" start="0"/> (being numFound)

David


On 4/05/2012 4:46 PM, Gnanakumar wrote:
Hi,

First off, we're a happy user of Apache Solr v3.1 Enterprise search server,
integrated and successfully running in our LIVE Production server.

Now, we're enhancing our existing search feature in our web application as
explained below, that truly helps application users in making informed
decision before getting their search results:

There will be 3 textboxes provided and users can enter keyword phrases with
OR, AND combination within each textbox as shown below, for example:
Textbox 1: "SQL Server" OR SQL
Textbox 2: "Visual Basic" OR VB.NET
Textbox 3: Java AND JavaScript

If User clicks "Search" button, we want to present an intermediate or
"results matrix" page that would generate all possible combinations for 3
textboxes with how many records found for each combination as given below
(between combination it is AND operation).  This, as I said before, truly
helps application users in making informed decision/choice before getting
their search results:
--------+---------------------+-------------------------+-------------------
-
Matches |       Textbox 1     |       Textbox 2         | Textbox 3
--------+---------------------+-------------------------+-------------------
-
   200  |"SQL Server" OR SQL  |                               |
   300  |                     |"Visual Basic" OR VB.NET |     
   400  |                     |                         | Java AND
JavaScript
   250  |"SQL Server" OR SQL  |"Visual Basic" OR VB.NET |   
   350  |                     |"Visual Basic" OR VB.NET | Java AND
JavaScript
   300  |"SQL Server" OR SQL  |                               | Java AND
JavaScript
   100  |"SQL Server" OR SQL  |"Visual Basic" OR VB.NET | Java AND
JavaScript
--------+---------------------+-------------------------+-------------------
-
Only on clicking one of this "Matches" count will display actual results of
that particular search.

My questions are,
        1) Do I need to run search separately for each combination or is it
possible to combine and obtain "results matrix" page by making "only" one
single call to              Apache Solr?  Or are they any plug-ins available
that provides functionality close to my use case?
        2) How do I instruct Solr to return only count (not result) for the
search performed?
        3) Any ideas/suggestions/approaches/resources are really appreciated
and welcomed

Regards,
Gnanam



Reply via email to