lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rob Outar" <rou...@ideorlando.org>
Subject RE: Querying Question
Date Thu, 03 Apr 2003 22:38:06 GMT
I do not tokenize the file name, the file name is what should be returned
from the query, I think Eric caught my issue, I do a query.ToLowerCase()
which turns AND to and which explains why I got back 4 results, but when I
added the "+" it forced the match.  I posted my analyzer a second ago it
should handle the case problem I am experiencing.

Thanks,

Rob


-----Original Message-----
From: Aviran Mordo [mailto:amordo@infosciences.com]
Sent: Thursday, April 03, 2003 5:34 PM
To: 'Lucene Users List'
Subject: RE: Querying Question


You should not tokenize the file name instead you should use

 doc.add(new Field(name, value,
            true, true, true));
Or
Doc.add(Field.keyword(name,value));

Aviran

-----Original Message-----
From: Rob Outar [mailto:routar@ideorlando.org]
Sent: Thursday, April 03, 2003 5:27 PM
To: Lucene Users List
Subject: RE: Querying Question


Use the following type of Field:

   doc.add(new Field(name, value,
            true, true, true));


Thanks,

Rob


-----Original Message-----
From: Aviran Mordo [mailto:amordo@infosciences.com]
Sent: Thursday, April 03, 2003 5:19 PM
To: 'Lucene Users List'
Subject: RE: Querying Question


Did you index the value field as a keyword?

Aviran

-----Original Message-----
From: Rob Outar [mailto:routar@ideorlando.org]
Sent: Thursday, April 03, 2003 5:11 PM
To: Lucene Users List
Subject: Querying Question
Importance: High


Hi all,

	I am a little fuzzy on complex querying using AND, OR, etc.. For
example:

I have the following name/value pairs

file 1 = name = "checkpoint" value = "filename_1"
file 2 = name = "checkpoint" value = "filename_2"
file 3 = name = "checkpoint" value = "filename_3"
file 4 = name = "checkpoint" value = "filename_4"

I ran the following Query:

name:\"checkpoint\" AND  value:\"filenane_1\"

Instead of getting back file 1, I got back all four files?

Then after trying different things I did:

+("name:\"checkpoint\") AND  +(value:\"filenane_1\")

it then returned file 1.

Our project queries solely on name value pairs and we need the ability
to query using AND, OR, NOTS, etc..  What the correct syntax for such
queries?

The code I use is :
 QueryParser p = new QueryParser("",
 new RepositoryIndexAnalyzer());
 this.query = p.parse(query.toLowerCase());
 Hits hits = this.searcher.search(this.query);

Thanks as always,

Rob



---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-user-help@jakarta.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-user-help@jakarta.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-user-help@jakarta.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-user-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-user-help@jakarta.apache.org


Mime
View raw message