While in theory -URL: should be valid syntax, the Lucene query parser
doesn't accept it and throws a ParseException. I've considered raising this
issue on lucene-dev but it didn't seem to affect many users so I decided not
to pursue the matter.
On 27/09/2007, Chris Hostetter [EMAIL PROTECTED]
thanks Peter, Hoss and Ryan..
q=(URL:[* TO *] -URL:)
This gives me 400 Query parsing error: Cannot parse '(URL:[* TO *] -
URL:)': Lexical error at line 1, column 29. Encountered: \ (34),
after : \
adding something like:
filter class=solr.LengthFilterFactory min=1 max=1 /
I'll
On 9/27/07, Pieter Berkel [EMAIL PROTECTED] wrote:
While in theory -URL: should be valid syntax, the Lucene query parser
doesn't accept it and throws a ParseException.
I don't have time to work on that now, but I did just open a bug:
https://issues.apache.org/jira/browse/LUCENE-1006
-Yonik
On 9/27/07, Yonik Seeley [EMAIL PROTECTED] wrote:
On 9/27/07, Pieter Berkel [EMAIL PROTECTED] wrote:
While in theory -URL: should be valid syntax, the Lucene query parser
doesn't accept it and throws a ParseException.
I don't have time to work on that now,
OK, I lied :-) It was simple
I have a large index with a field for a URL. For some reason or
another, sometimes a doc will get indexed with that field blank. This
is fine but I want a query to return only the set URL fields...
If I do a query like:
q=URL:[* TO *]
I get a lot of empty fields back, like:
docstr
I've experienced a similar problem before, assuming the field type is
string (i.e. not tokenized), there is subtle yet important difference
between a field that is null (i.e. not contained in the document) and one
that is an empty string (in the document but with no value). See
Your query will work if you make sure the URL field is omitted from the
document at index time when the field is blank.
adding something like:
filter class=solr.LengthFilterFactory min=1 max=1 /
to the schema field should do it without needing to ensure it is not
null or on the
: Date: Thu, 27 Sep 2007 00:12:48 -0400
: From: Ryan McKinley [EMAIL PROTECTED]
: Reply-To: solr-user@lucene.apache.org
: To: solr-user@lucene.apache.org
: Subject: Re: searching for non-empty fields
:
:
: Your query will work if you make sure the URL field is omitted from the
: document