Hi Joel, I'm a relative beginner to solr myself. I think the "s" and "t" are 
probably in the stopwords list because there will be a lot of them resulting 
from analysing of words such as "don't" and "person's". Whether that's (hey, 
another example!) an issue for you will probably depend on what analysers 
you're using. 

If you want that query to ignore stopwords, you might have to set up another 
index for that field, once with stopwords and once without.
bern

-----Original Message-----
From: Joel Nylund [mailto:jnyl...@yahoo.com] 
Sent: Thursday, 29 October 2009 9:31 AM
To: solr-user@lucene.apache.org
Subject: Re: weird problem with letters S and T

Thanks Bern, now that you mention it they are in there, I assume if I  
remove them it will work, but I probably dont want to do that right?

Is there a way for this particular query to ignore stopwords

thanks
Joel

On Oct 28, 2009, at 6:20 PM, Bernadette Houghton wrote:

> Hi Joel, I had a similar issue the other day; in my case the  
> solution turned out to be that the letters were stopwords. Don't  
> know if this is your answer, but worth checking.
> Bern
>
> -----Original Message-----
> From: Joel Nylund [mailto:jnyl...@yahoo.com]
> Sent: Thursday, 29 October 2009 9:17 AM
> To: solr-user@lucene.apache.org
> Subject: weird problem with letters S and T
>
> (I am super new to solr, sorry if this is an easy one)
>
> Hi, I want to support an A-Z type view of my data.
>
> I have a DataImportHandler that uses sql (my query is complex, but the
> part that matters is:
>
> SELECT f.id, f.title, LEFT(f.title,1) as firstLetterTitle FROM Foo f
>
> I can create this index with no issues.
>
> I can query the title with no problem:
>
> http://localhost:8983/solr/select?q=title:super
>
> I can query the first letters mostly with no problem:
>
> http://localhost:8983/solr/select?q=firstLetterTitle:a
>
> Returns all the foo's with the first letter a.
>
> This actually works with every letter except S and T
>
> If I query those, I get no results. The weird thing if I do the title
> query above with "Super" I get lots of results, and the xml shoes the
> firstLetterTitles for those to be "S"
>
> <doc>
> <str name="firstLetterTitle">S</str>
> <str name="id">84861348</str>
> <str name="title">Super Cool</str>
> </doc>
> −
> <doc>
> <str name="firstLetterTitle">S</str>
> <str name="id">108692</str>
> <str name="title">Super 45</str>
> </doc>
> −
> <doc>
>
> etc.
>
> Any ideas, are S and T special chars in query for solr?
>
> here is the response from the s query with debug = true
>
> <response>
> −
> <lst name="responseHeader">
> <int name="status">0</int>
> <int name="QTime">24</int>
> −
> <lst name="params">
> <str name="q">firstLetterTitle:s</str>
> <str name="debugQuery">true</str>
> </lst>
> </lst>
> <result name="response" numFound="0" start="0"/>
> −
> <lst name="debug">
> <str name="rawquerystring">firstLetterTitle:s</str>
> <str name="querystring">firstLetterTitle:s</str>
> <str name="parsedquery"/>
> <str name="parsedquery_toString"/>
> <lst name="explain"/>
> <str name="QParser">OldLuceneQParser</str>
> −
> <lst name="timing">
> <double name="time">2.0</double>
> −
> <lst name="prepare">
> <double name="time">1.0</double>
> −
> <lst name="org.apache.solr.handler.component.QueryComponent">
> <double name="time">1.0</double>
> </lst>
> −
> <lst name="org.apache.solr.handler.component.FacetComponent">
> <double name="time">0.0</double>
> </lst>
> −
> <lst name="org.apache.solr.handler.component.MoreLikeThisComponent">
> <double name="time">0.0</double>
> </lst>
> −
> <lst name="org.apache.solr.handler.component.HighlightComponent">
> <double name="time">0.0</double>
> </lst>
> −
> <lst name="org.apache.solr.handler.component.DebugComponent">
> <double name="time">0.0</double>
> </lst>
> </lst>
> −
> <lst name="process">
> <double name="time">0.0</double>
> −
> <lst name="org.apache.solr.handler.component.QueryComponent">
> <double name="time">0.0</double>
> </lst>
> −
> <lst name="org.apache.solr.handler.component.FacetComponent">
> <double name="time">0.0</double>
> </lst>
> −
> <lst name="org.apache.solr.handler.component.MoreLikeThisComponent">
> <double name="time">0.0</double>
> </lst>
> −
> <lst name="org.apache.solr.handler.component.HighlightComponent">
> <double name="time">0.0</double>
> </lst>
> −
> <lst name="org.apache.solr.handler.component.DebugComponent">
> <double name="time">0.0</double>
> </lst>
> </lst>
> </lst>
> </lst>
> </response>
>
>
>
> thanks
> Joel
>

Reply via email to