Re: is there a Query for this?

2007-01-17 Thread Doron Cohen
How about BooleanQuery.setMinimumNumberShouldMatch(int min)? "Van Nguyen" <[EMAIL PROTECTED]> wrote on 17/01/2007 16:58:50: > Just wondering if there was a query for this: > > > > Let's say I want to query: "white hard hat". Is there a query that will > build something like this: > > > > (+field

is there a Query for this?

2007-01-17 Thread Van Nguyen
Just wondering if there was a query for this: Let's say I want to query: "white hard hat". Is there a query that will build something like this: (+field:white +field:hard field:hat) (+field:white field:hard +field:hat) (field:white +field:hard +field:hat) In other words... the query ne

Re: only one search result

2007-01-17 Thread silegav_k
Found my mistake. After all it was not something about lucene, but it was an algorithmic problem Thank you! Vagelis I'll try downloading Lucene again and use the new untouched version. I have the lucene-core-2.0.0.jar but I think I have made some "changes" in some of its classes. I will downlo

Re: sorting issue with un-tokenized field

2007-01-17 Thread Erick Erickson
I'd look at a couple of things: 1> are you absolutely sure you didn't store bookTitles more than once? i.e. doc = new DOcument(); doc.add(new Term("bookTitles", .)); doc.add(new Term("bookTitles", .)); writer.add(doc); 2> When you built your index, did you append to an old one or replace

Re: sorting issue with un-tokenized field

2007-01-17 Thread Doron Cohen
For sorting by, that field must be added to the document exactly *once*, as UN_TOKENIZED. This way there would be at most one token in that field for each document. If, for instance, that field is added twice to the document, with same or different values, then although UN_TOKENIZED is specified i

Re: sorting issue with un-tokenized field

2007-01-17 Thread moraleslos
Oops, accidently pressed the ENTER key before doing anything ;-) I have a field called "bookTitle" that I specified as UN_TOKENIZED and STORED in the index (i.e. keyword). However, when I do a sort on this field during a search I get this error: Exception occurred during search: java.lang.Runt

sorting issue with un-tokenized field

2007-01-17 Thread moraleslos
-- View this message in context: http://www.nabble.com/sorting-issue-with-un-tokenized-field-tf3029674.html#a8418417 Sent from the Lucene - Java Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTE

Re: Searching/indexing date/time values or numeric values?

2007-01-17 Thread Doron Cohen
John Song <[EMAIL PROTECTED]> wrote on 17/01/2007 11:09:40: > ultimately, everything is text search. For decimal number, what you > do is to write a customized analyzer which multiple the number by > some factor, round it to a long and then use NumberTools to convert > that into a text string. H

Re: Searching/indexing date/time values or numeric values?

2007-01-17 Thread John Song
ultimately, everything is text search. For decimal number, what you do is to write a customized analyzer which multiple the number by some factor, round it to a long and then use NumberTools to convert that into a text string. Here is what I did for latitude/longitude search: multiple it by 10

Re: confuse of required and prohibited in BooleanQuery

2007-01-17 Thread Daniel Naber
On Wednesday 17 January 2007 11:30, David wrote: >    2.There are four logical combinations of these flags, but the case > where both are true is an illogical and invalid combination >    but I don't know why, Can anybody explain it to me? You're right. Because of this the API was changed in Luce

Searching/indexing date/time values or numeric values?

2007-01-17 Thread Jiho Han
Is there a way to index/search so that a query could be written to search on a field using arithmetic comparison operators? What I mean is if I had a date/time field called CREATEDATE, I would search for all documents where: CREATEDATE > "1/1/2007" The above is obvisouly pseudo-query expression.

Re: only one search result

2007-01-17 Thread silegav_k
I'll try downloading Lucene again and use the new untouched version. I have the lucene-core-2.0.0.jar but I think I have made some "changes" in some of its classes. I will download it again and try one step at a time. I will come up with new questions soon! Thank you Vagelis Erick Erickson wro

RE: Another MultiFieldQueryParser question...

2007-01-17 Thread Jiho Han
After investigating using Luke, I found that the field in question is indeed being stored as-is. But the query is lowercasing the query value. I guess that's why I needed KeywordAnalyzer for the particular field. An alternative approach would have been to store all lowercase values during indexin

RE: Another MultiFieldQueryParser question...

2007-01-17 Thread Jiho Han
I'll try Luke. Something is definitely not right because if your explanation of UNTOKENIZED is correct - and I believe it is - then my searches using the exact text with matching casing should have returned results. -Original Message- From: Erick Erickson [mailto:[EMAIL PROTECTED] Sent:

Re: what's the newest version of "Lucene in Action"

2007-01-17 Thread Erik Hatcher
David, I was moments away from sending out a status on LIA2. I posted the short and sweet version here: Excerpted: "Yes, we are planning a 2nd edition. The road from LIA1 to LIA2 has been a combination of busyness, lazy

Fwd: How to index in real time?

2007-01-17 Thread Scott Green
-- Forwarded message -- From: Scott Green <[EMAIL PROTECTED]> Date: Jan 17, 2007 11:15 AM Subject: How to index in real time? To: nutch-dev@lucene.apache.org Hi list, Firstly, i don't know whether nutch-dev mail list is suitable for this topic or not. If I post in the wrong plac

Re: only one search result

2007-01-17 Thread Erick Erickson
I've never had any problems with StandardAnalyzer. Could you perhaps post the code snippet that causes this? I'm wondering about things like what JVM you're using, what your classpath looks like, what Lucene version you're using etc. Erick On 1/17/07, silegav_k <[EMAIL PROTECTED]> wrote: I ha

Indexing PURE jsp-code

2007-01-17 Thread Keshishian, Arsineh
Hi everyone! I'm trying to index .jsp-pages. I dont want to index jsp pages that the user would see but the pure jsp code before translation to html pages. Is there any way? Can I simply use the htmparser? Thanks for any help Arsineh

Re: IndexReader.docFreq

2007-01-17 Thread Otis Gospodnetic
Use Luke, Bhavin, use Luke. Yes, that's looking for the exact match. You are not performing a search and you are not analyzing that term you are looking for in the index. Otis - Original Message From: Bhavin Pandya <[EMAIL PROTECTED]> To: java-user@lucene.apache.org Sent: Wednesday, J

Re: IndexReader.docFreq

2007-01-17 Thread Bhavin Pandya
Hi Otis, Thanks for your prompt reply... But its happening for all search strings...not only for friends... If i fire "friend" or "boy" then also its not showing any results while it has... Is it something like that docFreq is checking for only Exact match... - Bhavin - Original Message

Re: IndexReader.docFreq

2007-01-17 Thread Otis Gospodnetic
Random guess: You are using an analyzer that stored "friend" (or some other stem), and not "friends", so term "friends" doesn't really exist in your inex - it's frequency is zero. Otis - Original Message From: Bhavin Pandya <[EMAIL PROTECTED]> To: java-user@lucene.apache.org Sent: Wed

IndexReader.docFreq

2007-01-17 Thread Bhavin Pandya
Hi, I am confused using IndexReader.docFreq... I am using lucene 1.9 my code snippet is, int noofdoc = mreader.docFreq(new Term("TITLE","friends")); where mreader is MultiReader... few doc from index which has TITLE likes... friends in usa girl friends boy friends but "noofdoc" is showi

confuse of required and prohibited in BooleanQuery

2007-01-17 Thread David
Hi all: I'm confused by the two argument "required" and "prohibited" in BooleanQuery function public void add(Query query, boolean required, boolean prohibited) There are two statement in "Lucene in Action" 1. Performing an OR query only requires setting the required and prohibited

Re: what's the newest version of "Lucene in Action"

2007-01-17 Thread Otis Gospodnetic
Lucene in Action (print and ebook/PDF) cover Lucene 1.4.3. Most of what's described in LIA still applies to Lucene 2.0 and even the development version, although some APIs have changed (the concepts are mostly the same). There will be LIA2, and Erik might send a relevant email in a few hours.

what's the newest version of "Lucene in Action"

2007-01-17 Thread David
Hi all: the pdf format "Lucene in Action" I'm reading now is talk about Lucene 1.4, Is the book updated with Lucene 2.0? I don't have any information about it. Appreciate your help -- David

Re: only one search result

2007-01-17 Thread silegav_k
I have used the same analyzer before and had no problems at all. The only difference is that I used it to search through full documents and not dictionary-like data. I also use the same analyzer in indexing and in searching, so this must not be the problem. I just tried the StandardAnalyzer as