lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alex Wang <aw...@crossview.com>
Subject Re: Weird Behavior When Querying Field of Type String
Date Thu, 13 May 2010 02:34:36 GMT
You are absolutely right. The fields have trailing spaces in it. Thanks Erick for your time.
Really appreciated!

Thanks,

Alex

On May 12, 2010, at 8:29 PM, Erick Erickson wrote:

> Click the "schema browser" link on the admin page.
> On the next page click
> the "fields" link, then the field in question.
> 
> But first I'd do whatever Chris suggested.....
> 
> BTW, the field definition you pasted isn't the one that
> really counts here, "fieldtype" is the one that does, but in this case
> the fieldtype is string, which stores things unanalyzed
> so I'm probably waaaay off track with the capitalization question.
> 
> The analysis tool isn't looking in your index, it's
> showing you what *would* happen to the text you type in
> given the analyzers defined for the field you identify.
> You can put totally bogus text in here and you'll still
> get output...
> 
> So here's my guess. You're not indexing just the value
> ProductBean, you're indexing "ProductBean blah blah blah".
> Since you're using the string type, that's exactly what's
> being indexed *as a single token*. Which is why
> the wildcard stuff is working and ProductBean by itself
> is not.
> 
> Try a "text" type rather than "string" and you might get some
> joy. You'll have to restart Solr and reindex to see this....
> 
> Of course I may be off base *again* <G>.
> 
> Best
> Erick
> 


Mime
View raw message