You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Jörg Kiegeland <ki...@ikv.de> on 2007/11/09 18:53:16 UTC
Trim filer active for solr.StrField ?
I have defined a field in the solr schema of type "string" which is
associated with solr.StrField . As it seems, strings with spaces as
prefix or suffix are written in the index correctly and if I view the
contents of the index with the web interface
the spaces are still there. But if I use the Solrj and query for
documents, the strings are trimmed (whitespace cutted at the end and an
the front). may be is some kind of TrimFilter active? How can I prevent
timming (by solr schema or in the solrj api)?
Thanks
Jörg
Re: Trim filer active for solr.StrField ?
Posted by Jörg Kiegeland <ki...@ikv.de>.
> what is your specific SolrQuery?
>
> calling:
> query.setQuery( " stuff with spaces " );
>
> does not call trim(), but some other calls do.
My query looks e.g.
(myField:"_T8sY05EAEdyU7fJs63mvdA" OR myField:"_T8sY0ZEAEdyU7fJs63mvdA"
OR myField:"_T8sY0pEAEdyU7fJs63mvdA") AND NOT
myField:"_T8sY1JEAEdyU7fJs63mvdA"
So I want to find all documents where field "myField" contains any of
some UUIDs and must not contain another set of other UUIDs.
The only other thing I do is set the result limit:
solrQuery.setRows(resultLimit);
The actual strings which are truncated are in other fields of returned
documents.
Any idea?
Re: Trim filer active for solr.StrField ?
Posted by Ryan McKinley <ry...@gmail.com>.
> the spaces are still there. But if I use the Solrj and query for
> documents, the strings are trimmed (whitespace cutted at the end and an
> the front). may be is some kind of TrimFilter active? How can I prevent
> timming (by solr schema or in the solrj api)?
>
what is your specific SolrQuery?
calling:
query.setQuery( " stuff with spaces " );
does not call trim(), but some other calls do.
ryan