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 Alessandro F <al...@inbox.com> on 2009/04/24 13:04:35 UTC

multifield queries dismax or...

Hi all,
I'm working to replace my old lucene java-based search functionalities with
Solr.

I implemented multi-field query search using the "dismax", but  the query
seams to take to much time (if I compare  with my old lucene queries). 


There is another way to perform multi-field query in solr?  
Following you can see the fragment og configuration of my solrconfig.xml and
a sample query I'm doing.


.......
<requestHandler name="partitioned" class="solr.SearchHandler" >
    <lst name="defaults">
     <str name="defType">dismax</str>
     <str name="echoParams">explicit</str>
     <str name="qf">text^0.5 features^1.0 name^1.2 sku^1.5 id^10.0</str>
     <str name="mm">2&lt;-1 5&lt;-2 6&lt;90%</str>
     <!-- This is an example of using Date Math to specify a constantly
          moving date range in a config...
       -->
     <str name="bq">incubationdate_dt:[* TO NOW/DAY-1MONTH]^2.2</str>
    </lst>
.......
.......



http://168.202.105.33:8080/solrServer/select/?q=food&start=0&indent=on&qf=txt.abstract_en+txt.abstract_fr+txt.abstract_es+txt.abstract_ar+txt.abstract_zh+txt.abstract_ot+txt.title_en+txt.title_fr+txt.title_es+txt.title_ar+txt.title_zh+txt.title_ot+txt.content+txt.year+txt.jobNumber+txt.lang&echoParams=all&version=2.2&qt=dismax&fl=txt.pubid&rows=10000


Thank you,
Alessandro

-- 
View this message in context: http://www.nabble.com/multifield-queries-dismax-or...-tp23214215p23214215.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: multifield queries dismax or...

Posted by Otis Gospodnetic <ot...@yahoo.com>.
Note that not only is pulling 10K documents out of the index (or even documentCache) slowing you down, but so is writing out and reading the response.

 Otis
--
Sematext -- http://sematext.com/ -- Lucene - Solr - Nutch



----- Original Message ----
> From: Alessandro F <al...@inbox.com>
> To: solr-user@lucene.apache.org
> Sent: Friday, April 24, 2009 11:38:02 AM
> Subject: Re: multifield queries dismax or...
> 
> 
> Hi Erik,
> thank you for the fast answere! 
> I didn't take care abut the number of the output records.
> I know 10000 recs are a lot, but i need these. 
> Actually if I reduce the number of the records the query is faster. so the
> problem seams releted to loading the content from the index, at that poit I
> have to change something in the logic of my process.
> Thank you,
> Regards
> Alessandro
> 
> 
> Erik Hatcher wrote:
> > 
> > Returning 10000 rows/documents - maybe that is the speed issue you're  
> > encountering?
> > 
> > Try adding &debugQuery=true to your request and look at the timings in  
> > the response.  What is the QueryComponent time?  Try returning fewer  
> > rows and see how the speed changes.
> > 
> >     Erik
> > 
> > On Apr 24, 2009, at 7:04 AM, Alessandro F wrote:
> > 
> >>
> >> Hi all,
> >> I'm working to replace my old lucene java-based search  
> >> functionalities with
> >> Solr.
> >>
> >> I implemented multi-field query search using the "dismax", but  the  
> >> query
> >> seams to take to much time (if I compare  with my old lucene queries).
> >>
> >>
> >> There is another way to perform multi-field query in solr?
> >> Following you can see the fragment og configuration of my  
> >> solrconfig.xml and
> >> a sample query I'm doing.
> >>
> >>
> >> .......
> >> 
> >>    
> >>    dismax
> >>    explicit
> >>    text^0.5 features^1.0 name^1.2 sku^1.5 id^10.0> >> str>
> >>    2<-1 5<-2 6<90%
> >>    
> >>    incubationdate_dt:[* TO NOW/DAY-1MONTH]^2.2
> >>    
> >> .......
> >> .......
> >>
> >>
> >>
> >> 
> http://168.202.105.33:8080/solrServer/select/?q=food&start=0&indent=on&qf=txt.abstract_en+txt.abstract_fr+txt.abstract_es+txt.abstract_ar+txt.abstract_zh+txt.abstract_ot+txt.title_en+txt.title_fr+txt.title_es+txt.title_ar+txt.title_zh+txt.title_ot+txt.content+txt.year+txt.jobNumber+txt.lang&echoParams=all&version=2.2&qt=dismax&fl=txt.pubid&rows=10000
> >>
> >>
> >> Thank you,
> >> Alessandro
> >>
> >> -- 
> >> View this message in context:
> >> 
> http://www.nabble.com/multifield-queries-dismax-or...-tp23214215p23214215.html
> >> Sent from the Solr - User mailing list archive at Nabble.com.
> > 
> > 
> > 
> 
> -- 
> View this message in context: 
> http://www.nabble.com/multifield-queries-dismax-or...-tp23214215p23219016.html
> Sent from the Solr - User mailing list archive at Nabble.com.


Re: multifield queries dismax or...

Posted by Alessandro F <al...@inbox.com>.
Hi Erik,
thank you for the fast answere! 
I didn't take care abut the number of the output records.
I know 10000 recs are a lot, but i need these. 
Actually if I reduce the number of the records the query is faster. so the
problem seams releted to loading the content from the index, at that poit I
have to change something in the logic of my process.
Thank you,
Regards
Alessandro


Erik Hatcher wrote:
> 
> Returning 10000 rows/documents - maybe that is the speed issue you're  
> encountering?
> 
> Try adding &debugQuery=true to your request and look at the timings in  
> the response.  What is the QueryComponent time?  Try returning fewer  
> rows and see how the speed changes.
> 
> 	Erik
> 
> On Apr 24, 2009, at 7:04 AM, Alessandro F wrote:
> 
>>
>> Hi all,
>> I'm working to replace my old lucene java-based search  
>> functionalities with
>> Solr.
>>
>> I implemented multi-field query search using the "dismax", but  the  
>> query
>> seams to take to much time (if I compare  with my old lucene queries).
>>
>>
>> There is another way to perform multi-field query in solr?
>> Following you can see the fragment og configuration of my  
>> solrconfig.xml and
>> a sample query I'm doing.
>>
>>
>> .......
>> <requestHandler name="partitioned" class="solr.SearchHandler" >
>>    <lst name="defaults">
>>     <str name="defType">dismax</str>
>>     <str name="echoParams">explicit</str>
>>     <str name="qf">text^0.5 features^1.0 name^1.2 sku^1.5 id^10.0</ 
>> str>
>>     <str name="mm">2&lt;-1 5&lt;-2 6&lt;90%</str>
>>     <!-- This is an example of using Date Math to specify a constantly
>>          moving date range in a config...
>>       -->
>>     <str name="bq">incubationdate_dt:[* TO NOW/DAY-1MONTH]^2.2</str>
>>    </lst>
>> .......
>> .......
>>
>>
>>
>> http://168.202.105.33:8080/solrServer/select/?q=food&start=0&indent=on&qf=txt.abstract_en+txt.abstract_fr+txt.abstract_es+txt.abstract_ar+txt.abstract_zh+txt.abstract_ot+txt.title_en+txt.title_fr+txt.title_es+txt.title_ar+txt.title_zh+txt.title_ot+txt.content+txt.year+txt.jobNumber+txt.lang&echoParams=all&version=2.2&qt=dismax&fl=txt.pubid&rows=10000
>>
>>
>> Thank you,
>> Alessandro
>>
>> -- 
>> View this message in context:
>> http://www.nabble.com/multifield-queries-dismax-or...-tp23214215p23214215.html
>> Sent from the Solr - User mailing list archive at Nabble.com.
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/multifield-queries-dismax-or...-tp23214215p23219016.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: multifield queries dismax or...

Posted by Erik Hatcher <er...@ehatchersolutions.com>.
Returning 10000 rows/documents - maybe that is the speed issue you're  
encountering?

Try adding &debugQuery=true to your request and look at the timings in  
the response.  What is the QueryComponent time?  Try returning fewer  
rows and see how the speed changes.

	Erik

On Apr 24, 2009, at 7:04 AM, Alessandro F wrote:

>
> Hi all,
> I'm working to replace my old lucene java-based search  
> functionalities with
> Solr.
>
> I implemented multi-field query search using the "dismax", but  the  
> query
> seams to take to much time (if I compare  with my old lucene queries).
>
>
> There is another way to perform multi-field query in solr?
> Following you can see the fragment og configuration of my  
> solrconfig.xml and
> a sample query I'm doing.
>
>
> .......
> <requestHandler name="partitioned" class="solr.SearchHandler" >
>    <lst name="defaults">
>     <str name="defType">dismax</str>
>     <str name="echoParams">explicit</str>
>     <str name="qf">text^0.5 features^1.0 name^1.2 sku^1.5 id^10.0</ 
> str>
>     <str name="mm">2&lt;-1 5&lt;-2 6&lt;90%</str>
>     <!-- This is an example of using Date Math to specify a constantly
>          moving date range in a config...
>       -->
>     <str name="bq">incubationdate_dt:[* TO NOW/DAY-1MONTH]^2.2</str>
>    </lst>
> .......
> .......
>
>
>
> http://168.202.105.33:8080/solrServer/select/?q=food&start=0&indent=on&qf=txt.abstract_en+txt.abstract_fr+txt.abstract_es+txt.abstract_ar+txt.abstract_zh+txt.abstract_ot+txt.title_en+txt.title_fr+txt.title_es+txt.title_ar+txt.title_zh+txt.title_ot+txt.content+txt.year+txt.jobNumber+txt.lang&echoParams=all&version=2.2&qt=dismax&fl=txt.pubid&rows=10000
>
>
> Thank you,
> Alessandro
>
> -- 
> View this message in context: http://www.nabble.com/multifield-queries-dismax-or...-tp23214215p23214215.html
> Sent from the Solr - User mailing list archive at Nabble.com.