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: Tuesday, January 16, 2007 8:01 PM
To: java-user@lucene.apache.org
Subject: Re: Another MultiFieldQueryParser question...

UN_TOKENIZED fields are indexed "as is", without going through an
analyzer.
What that means is....
1> no casing is done.
2> multi-word values are stored just like they are put in. So indexing
"wordone wordtwo" results in exactly one token being indexed... you
guessed it, "wordone wordtwo". Which means that searching for "wordone"
will NOT result in a hit. DItto for hyphens, punctuation, etc (although
I'd check out my punctuation claim <G>).

when you store a field TOKENIZED, the input stream is put through
whatever analyzer you specified and the resulting tokens are indexed.
So, depending on the tokenizer the analyzer uses, you'll index a varying
number of strings.

>From the javadoc <<<Index the field's value without using an Analyzer,
so it can be searched. As no analyzer is used the value will be stored
as a single term. This is useful for unique Ids like product numbers.>>>

If you haven't, I'd strongly recommend getting a copy of Luke (google
lucene
luke) and use it to examine your index. I've found it quite useful for
getting a handle on similar questions....

Best
Erick

On 1/16/07, Jiho Han <[EMAIL PROTECTED]> wrote:
>
> Thanks for the information.
>
> After checking out the query using ToString(), I did not see anything 
> unusual really.
> But I noticed that the search result was a miss only for certain field

> combinations.  And eventually it led me to the conclusion that the 
> search was not returning results where the fields weren't tokenized.  
> So searching through the mailing list archive, I found some 
> information and I successfully used PerFieldAnalyzerWrapper and 
> KeywordAnalyzer to return correct results.
>
> One question I have is though, what the difference between TOKENIZED
vs.
> UNTOKENIZED is.  What really confuses me is that I have a numeric 
> field that is untokenized and that does not require the wrapper.
>
> Jiho
>
> -----Original Message-----
> From: Doron Cohen [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, January 16, 2007 2:46 AM
> To: java-user@lucene.apache.org
> Subject: Re: Another MultiFieldQueryParser question...
>
> "Jiho Han" <[EMAIL PROTECTED]> wrote on 15/01/2007 10:50:14:
>
> > I looked through the archive a bit and found some Q & A's regarding 
> > this but I didn't see anything definitive so I thought I'd ask
> again...
> >
> > Basically, I have a web page that can search through a database 
> > table across multiple servers.
> > So imagine that there are 100 different databases spread across a 
> > number of servers but the schema is same.
> > I created an index with fields specific to each row in a particular 
> > table such as NAME, TYPE, COMPANY, etc. in addition to SERVER, 
> > DATABASE so I can capture where they are from.
> >
> > Ultimately, what I want is a single HTML input field that can 
> > capture a query expression and instantiate a searcher and return a
result set.
> > This querystring should be in any number of forms:
> >
> > Ex)
> > John Doe ABC Company (which would search for each word OR'ed in all 
> > of
>
> > the fields) "John Doe" And "ABC Company" (which would search for 
> > "John
>
> > Doe" AND'ed with "ABC Company" in all of the fields) NAME:"John Doe"
> > COMPANY:"ABC Company" (which would search for results where either 
> > NAME contains "John Doe" OR COMPANY contains "ABC Company") 
> > NAME:"John
>
> > Doe" And COMPANY:"ABC Company" (which would search in each field but

> > must match both fields)
> > +NAME:"John Doe" +COMPANY:"ABC Company" (which I understand is same 
> > +as
> > the previous line - if not please correct me)
> >
> > So I am wondering if a single instance of Query and 
> > MultiFieldQueryParser can do this.  Do I need any other special 
> > processing?
> >
> > Here's what I have right now (C#):
> >
> >         string[] searchFields = new string[] {
> >             "SERVER", "DATABASE", "NAME", "COMPANY", "TYPE"
> >         };
> >
> >         MultiFieldQueryParser parser = new 
> > MultiFieldQueryParser(searchFields, new StandardAnalyzer());
> >         parser.SetDefaultOperator(QueryParser.Operator.OR);
> >         Query query = parser.Parse(querystring);
> >
> > Then I pass 'query' into MultiSearcher.  Well, it's not returning 
> > the results as I expect.
>
> How is it different from what you expect?
> One thing to fix is: change And to AND If still results seem wrong try

> printing the query (toString()) - is that as you expect?
>
> Doron
>
> > Can some show me what I need to change?
> > Thanks
> >
> > Jiho Han
> > Senior Software Engineer
> > Infinity Info Systems
> > The Sales Technology Experts
> > Tel: 212.563.4400 x6375
> > Fax: 212.760.0540
> > [EMAIL PROTECTED]
> > www.infinityinfo.com <http://www.infinityinfo.com/>
> >
> >
> >
> > --------------------------------------------------------------------
> > - To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

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

Reply via email to