You could try a "[* TO *]" range query. It will also match all documents
which have a non-null field value.
So: q=body:[* TO *]
Actually, I see that you have reverse wildcard enabled. Try removing that.
"*" would normally map to PrefixQuery, which is normally more efficient than
a WildcardQuery.
-- Jack Krupansky
-----Original Message-----
From: srinalluri
Sent: Tuesday, August 21, 2012 4:21 PM
To: solr-user@lucene.apache.org
Subject: Solr 3.6.1: query performance is slow when asterisk is in the query
Our environment is Solr 3.6.1. I have the following fieldType. There is a
field called 'body' of this fieldType. When I make a query: q=body:*, it is
talking longer than the expected. What are the changes I need to do to this
fieldType for better query performance? Some other fieldTypes in our schema
are performing better.
<fieldType name="text_general_html" class="solr.TextField"
positionIncrementGap="100">
<analyzer type="index">
<tokenizer class="solr.StandardTokenizerFactory"/>
<charFilter class="solr.HTMLStripCharFilterFactory"/>
<filter class="solr.StopFilterFactory" ignoreCase="true"
words="stopwords.txt" enablePositionIncrements="true" />
<filter class="solr.LowerCaseFilterFactory"/>
<filter class="solr.ReversedWildcardFilterFactory"/>
</analyzer>
<analyzer type="query">
<tokenizer class="solr.StandardTokenizerFactory"/>
<filter class="solr.StopFilterFactory" ignoreCase="true"
words="stopwords.txt" enablePositionIncrements="true" />
<filter class="solr.SynonymFilterFactory" synonyms="synonyms.txt"
ignoreCase="true" expand="true"/>
<filter class="solr.LowerCaseFilterFactory"/>
</analyzer>
</fieldType>
Thanks in advance
Srini
--
View this message in context:
http://lucene.472066.n3.nabble.com/Solr-3-6-1-query-performance-is-slow-when-asterisk-is-in-the-query-tp4002496.html
Sent from the Solr - User mailing list archive at Nabble.com.