Re: Field searching for nothing

2005-04-09 Thread Ivan Gužvinec
I believe there isn't. I don't think any of the existing QueryParsers 
implements "search empty field" expression.

The way you might solve this requirement is to use a special "empty term" 
for such fields. For instance, I use single underscore "_" as a value for 
all empty fields in the document. I also use Keyword field to store this 
value verbatim (avoid Analyser that might not want to index a single 
underscore).

Searching for "empty term" can then be performed programmaticaly with a 
TermQuery:
indexSearcher.Search(new TermQuery(new Term("author", "_")));

General guide for the "empty term" value would be to choose a term that does 
not occur in any text you put into your index.


On Apr 9, 2005 12:44 AM, Bruce Best (CRO) <[EMAIL PROTECTED]> wrote:
> Is there any syntax to find all the documents where a particular
> Lucene-indexed field is empty?
> 
> For instance, say there is a field called "author". I can do a field 
search
> for
> author:cutting
> to find all documents with "cutting" in the author field; I could also
> search for
> author:"*"
> which would return all documents, whether there was something in the 
author
> field or not.
> 
> What if I wanted to find all those documents that had nothing at all in 
the
> "author" field? I tried a few combinations of wildcards and other various
> Lucene symbols, but they generally resulted in errors.
> 
> Is it possible with Lucene to specify "Return all documents where fieldx: 
is
> empty"?
> 
> Thanks,
> 
> B.
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
>


NoSuchMethodError

2005-04-09 Thread xx28
Hello -

I tried to modify Document(File) method as Document1(String) of 
HTMLDocument.java. The parameter is String, not File. However I got: 

Exception in thread "main" java.lang.NoSuchMethodError: 
org.apache.lucene.demo.HTMLDocument.Document1(Ljava/lang/String;)Lorg/apache/lucene/document/Document;
at 
org.apache.lucene.demo.IndexRemoteHTML.indexDocs1(IndexRemoteHTML.java:173)
at 
org.apache.lucene.demo.IndexRemoteHTML.indexDocs(IndexRemoteHTML.java:120)
at org.apache.lucene.demo.IndexRemoteHTML.main(IndexRemoteHTML.java:74)

What could be wrong?

Thanks for help in advance...

George


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Lucene on Palm OS?

2005-04-09 Thread Peter A. Daly
Does anyone know if it possible/feasible to run lucene on PalmOS? 
I've never done any Palm development before, but have an application
in which Lucene is a critical component that I'd like to make work on
my Tungsten T3 as well as other palms if possible.

I'm trying to feel out whether this is a project worth attempting.

Thanks,

-Pete

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]