lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Erick Erickson <>
Subject Re: Zero Query results
Date Sat, 19 Sep 2015 02:30:04 GMT
bq: There is no fieldType defined in my solrconfig.xml, unless you are
referring to this line:

Well, that's because you should be looking in schema.xml ;).....

This line from your stacktrace file is very suspicious:
  <str name="parsedquery_toString">logtext:Wednesday</str>

It _looks_ like your logtext file is perhaps a "string" type. String
types are totally unanalyzed,
so unless the input matches _exactly_ (and by exactly mean same case,
same words, same
order, identical punctuation) you won't find the doc. Thus with a
string field type, if the doc had
"my Dog has fleas.", searching for "my" or "My" or "My dog has fleas"
or "my Dog has fleas"
would all not find the doc (this last one has no period".

You usually want one of the text types, text_en or the like. Note that
you will be a _long_ time
figuring out how all that works and affects your searches, the
admin/analysis page is definitely
your friend.

There should be a line similar to
<field name="logtext" type="something" blah blah blah/>

Somewhere else there should be something like:
<fieldType name="something" potentially a lot of stuff, perhaps lots
of lines maybe not />

The fieldType is what determines how the text is handled to search,
how it's broken up
and, in essence, how searches behave.

So what Erik and Shawn were asking is those two definitions.

Do note if you've changed the definitions here, it's usually wise to
'rm -rf <core>/data' and completely re-index from scratch.


On Fri, Sep 18, 2015 at 8:53 PM, Mark Fenbers <> wrote:
> On 9/18/2015 8:33 PM, Shawn Heisey wrote:
>> The "field:*" syntax is something you should not get in the habit of
>> using.  It is a wildcard search.  What this does under the covers is
>> looks up all the possible terms in that field across the entire index,
>> and constructs a Lucene query that actually includes all those terms.
>> If you execute a search like this on a field that has millions or
>> billions of terms, Solr will find them all.  It will use a ton of memory
>> and be quite slow.
> Yes.  I only specified * to see if it would return ANY results, because
> searching on a fixed string does not.
>> For the problem with "Sunday":
>> What fieldType is used for "logtext"?
> There is no fieldType defined in my solrconfig.xml, unless you are referring
> to this line:
> <str name="queryAnalyzerFieldType">text_general</str>
> Should I have one??  Defined where?
> If you are talking about the fieldType of this column in the PostgreSQL
> database, it is "Text"...
>> We'll also need the full
>> definition of that fieldType,
> Not sure what you want here...  (Herein may lie my problem...)
>> and an example of the full text indexed
>> into that field for a document that should match, but doesn't.
> Attached are 2 files: one where I used "*" and so it returned all documents,
> but I only include the top 2 in my attachment.  You can see the first
> document contains the word "Wednesday".  So I replaced "*" with "Wednesday"
> and ran the query again.  This is the second attachment, showing zero
> results.   The "logtext" field is what I search on, and this field type is
> plain text, although I don't think I specifically declare this anywhere.
> Both attachments were run with debug on.
> Thanks,
> Mark
>> You should also check the "debugQuery" box on the Query tab, and give us
>> the "rawquerystring" and "parsedquery" values from the debug.
>> Thanks,
>> Shawn

View raw message