(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