You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by Otis Gospodnetic <ot...@yahoo.com> on 2002/03/20 04:32:54 UTC

Re: Lucene Bugs

Hello,

--- David Smiley <da...@verizon.net> wrote:
> I have reported bugs about Lucene in the fall of 2001 but no Lucene 
> developer has responded.  I am sending this summary as a reminder.
> 
> My original message to the mailing list is here:
> 
> [Lucene-dev] More bugs
> http://www.geocrawler.com/archives/3/2626/2001/8/0/6409669/
> 
> The bugs at SourceForge are here:
> 
> DateFilter: call enum.next() first

DateFilter.java has changed since the report, but I think I found the
piece of code that you were referring to.
After looking at DateFilter, TermEnum, and FilteredTermEnum it seems to
me that next() does not need to be called first.  This is not
java.util.Enumeration enum, it is TermEnum's enum.
Also, if you look at methods next() and term() in FilteredTermEnum
you'll see that term() does need to be called first, otherwise the
first term would get skipped.
I'm not very familiar with this code, but this is what it seems like
from looking at it for 7:32 minutes.

Otis


__________________________________________________
Do You Yahoo!?
Yahoo! Sports - live college hoops coverage
http://sports.yahoo.com/

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Multiple field searching

Posted by Peter Carlson <ca...@bookandhammer.com>.
HI,
The AND is not quite the same as +, the AND puts a + next to the previous
and next word.
That is foo AND bar is equivlent to +foo +bar
If you just said foo +bar then you have foo optional and bar required.

Slight difference.

>From looking at the queryParser a while ago the {} characters are exclusive
(or maybe it's inclusive) range query operators, similar to [].  I don't
think they make sense here.

--Peter

On 3/21/02 4:30 AM, "Kelvin Tan" <ke...@relevanz.com> wrote:

> hmmm...really?
> 
> My impression was that the "AND"s are treated equivalently with "+"s by the
> parser, so they're redundant. The "{" and "}"s aren't part of the syntax,
> are they?
> 
> Kelvin
> ----- Original Message -----
> From: "Mehran Mehr" <me...@yahoo.com>
> To: "Lucene Users List" <lu...@jakarta.apache.org>; "Kelvin Tan"
> <ke...@relevanz.com>
> Sent: Thursday, March 21, 2002 8:11 PM
> Subject: Re: Multiple field searching
> 
> 
>> this is the right syntax:
>> 
>> +(keyword:{computers}) AND +(subject:{News}) AND
>> content:xml
>> 
>> 
>> __________________________________________________
>> Do You Yahoo!?
>> Yahoo! Movies - coverage of the 74th Academy Awards®
>> http://movies.yahoo.com/
>> 
>> --
>> To unsubscribe, e-mail:
> <ma...@jakarta.apache.org>
>> For additional commands, e-mail:
> <ma...@jakarta.apache.org>
>> 
> 
> 
> --
> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
> 
> 


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Multiple field searching

Posted by Kelvin Tan <ke...@relevanz.com>.
----- Original Message -----
From: "Otis Gospodnetic" <ot...@yahoo.com>
To: "Lucene Users List" <lu...@jakarta.apache.org>
Sent: Friday, March 22, 2002 1:24 AM
Subject: Re: Multiple field searching


>
> --- Kelvin Tan <ke...@relevanz.com> wrote:
> > hmmm...really?
> >
> > My impression was that the "AND"s are treated equivalently with "+"s
> > by the
> > parser, so they're redundant.
>
> Correct.
>
> > The "{" and "}"s aren't part of the syntax, are they?
>
> I was wondering where those came from.
> I don't think I've seen them in QueryParser.jj.

<Feeling Guilty>It could possibly be the documentation in
MultiFieldQueryParser...</Feeling Guilty>

    /**
     * <p>
     * Parses a query which searches on the fields specified.
     * <p>
     * If x fields are specified, this effectively constructs:
     * <pre>
     * <code>
     * ({field1}:{query}) ({field2}:{query})
({field3}:{query})...({fieldx}:{query})
     * </code>
     * </pre>
     *
     * @param query Query string to parse
     * @param fields Fields to search on
     * @param analyzer Analyzer to use
     */

Kelvin

>
> Otis
>
> > ----- Original Message -----
> > From: "Mehran Mehr" <me...@yahoo.com>
> > To: "Lucene Users List" <lu...@jakarta.apache.org>; "Kelvin
> > Tan"
> > <ke...@relevanz.com>
> > Sent: Thursday, March 21, 2002 8:11 PM
> > Subject: Re: Multiple field searching
> >
> >
> > > this is the right syntax:
> > >
> > > +(keyword:{computers}) AND +(subject:{News}) AND
> > > content:xml
> > >
> > >
> > > __________________________________________________
> > > Do You Yahoo!?
> > > Yahoo! Movies - coverage of the 74th Academy Awards®
> > > http://movies.yahoo.com/
> > >
> > > --
> > > To unsubscribe, e-mail:
> > <ma...@jakarta.apache.org>
> > > For additional commands, e-mail:
> > <ma...@jakarta.apache.org>
> > >
> >
> >
> > --
> > To unsubscribe, e-mail:
> > <ma...@jakarta.apache.org>
> > For additional commands, e-mail:
> > <ma...@jakarta.apache.org>
> >
>
>
> __________________________________________________
> Do You Yahoo!?
> Yahoo! Movies - coverage of the 74th Academy Awards®
> http://movies.yahoo.com/
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>
>
>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Multiple field searching

Posted by Otis Gospodnetic <ot...@yahoo.com>.
--- Kelvin Tan <ke...@relevanz.com> wrote:
> hmmm...really?
> 
> My impression was that the "AND"s are treated equivalently with "+"s
> by the
> parser, so they're redundant. 

Correct.

> The "{" and "}"s aren't part of the syntax, are they?

I was wondering where those came from.
I don't think I've seen them in QueryParser.jj.

Otis

> ----- Original Message -----
> From: "Mehran Mehr" <me...@yahoo.com>
> To: "Lucene Users List" <lu...@jakarta.apache.org>; "Kelvin
> Tan"
> <ke...@relevanz.com>
> Sent: Thursday, March 21, 2002 8:11 PM
> Subject: Re: Multiple field searching
> 
> 
> > this is the right syntax:
> >
> > +(keyword:{computers}) AND +(subject:{News}) AND
> > content:xml
> >
> >
> > __________________________________________________
> > Do You Yahoo!?
> > Yahoo! Movies - coverage of the 74th Academy Awards�
> > http://movies.yahoo.com/
> >
> > --
> > To unsubscribe, e-mail:
> <ma...@jakarta.apache.org>
> > For additional commands, e-mail:
> <ma...@jakarta.apache.org>
> >
> 
> 
> --
> To unsubscribe, e-mail:  
> <ma...@jakarta.apache.org>
> For additional commands, e-mail:
> <ma...@jakarta.apache.org>
> 


__________________________________________________
Do You Yahoo!?
Yahoo! Movies - coverage of the 74th Academy Awards�
http://movies.yahoo.com/

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Multiple field searching

Posted by Kelvin Tan <ke...@relevanz.com>.
hmmm...really?

My impression was that the "AND"s are treated equivalently with "+"s by the
parser, so they're redundant. The "{" and "}"s aren't part of the syntax,
are they?

Kelvin
----- Original Message -----
From: "Mehran Mehr" <me...@yahoo.com>
To: "Lucene Users List" <lu...@jakarta.apache.org>; "Kelvin Tan"
<ke...@relevanz.com>
Sent: Thursday, March 21, 2002 8:11 PM
Subject: Re: Multiple field searching


> this is the right syntax:
>
> +(keyword:{computers}) AND +(subject:{News}) AND
> content:xml
>
>
> __________________________________________________
> Do You Yahoo!?
> Yahoo! Movies - coverage of the 74th Academy Awards®
> http://movies.yahoo.com/
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>
>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Multiple field searching

Posted by Mehran Mehr <me...@yahoo.com>.
this is the right syntax:

+(keyword:{computers}) AND +(subject:{News}) AND
content:xml


__________________________________________________
Do You Yahoo!?
Yahoo! Movies - coverage of the 74th Academy Awards�
http://movies.yahoo.com/

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Multiple field searching

Posted by Kelvin Tan <ke...@relevanz.com>.
----- Original Message -----
From: "Otis Gospodnetic" <ot...@yahoo.com>
To: "Lucene Users List" <lu...@jakarta.apache.org>; "Kelvin Tan"
<ke...@relevanz.com>
Sent: Thursday, March 21, 2002 2:13 PM
Subject: Re: Multiple field searching


> Kelvin,
>
> Right now I can't imagine a situation where one would need to pass
> multiple query strings in.  I certainly don't need it anywhere where I
> use Lucene, at least not yet.  So I'd say hold off with that addition
> unless people say they really need it.  Couldn't one always just call
> the parse method multiple times with a different query string each
> time, and then combine returned Query instances?
>

Otis,

I suppose that's possible.

Actually if you need to construct complex multi-field boolean queries via a
web-based form, my recommendation is to use client-side Javascript. I posted
one such script a while back (for the life of me I don't know why it slipped
my mind about it). The difficulty, IMHO, is not getting QueryParser to
construct the query, but making query construction by the end-user simple
enough and idiot-proof...:)

Regards,
Kelvin


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Multiple field searching

Posted by Otis Gospodnetic <ot...@yahoo.com>.
Kelvin,

Right now I can't imagine a situation where one would need to pass
multiple query strings in.  I certainly don't need it anywhere where I
use Lucene, at least not yet.  So I'd say hold off with that addition
unless people say they really need it.  Couldn't one always just call
the parse method multiple times with a different query string each
time, and then combine returned Query instances?

Otis

--- Kelvin Tan <ke...@relevanz.com> wrote:
> Tate,
> 
> The correct syntax is something like +(keyword:computers)
> -(subject:News).
> 
> HTH.
> 
> Maybe it would be helpful to add parse(String[] query, String[]
> fields,
> Analyzer analyzer) methods into MultiFieldQueryParser? What do you
> think
> Otis?
> 
> Kelvin
> ----- Original Message -----
> From: "Tate Jones" <ta...@pisoftware.com>
> To: "Lucene Users List" <lu...@jakarta.apache.org>
> Sent: Wednesday, March 20, 2002 3:36 PM
> Subject: Multiple field searching
> 
> 
> > hi,
> >
> > I am trying to search across multiple fields using the following
> query
> >
> > +keyword:computers +subject:News content:xml
> > or
> > +(keyword:{computers}) +(subject:{News}) content:xml
> >
> > i have added the fields to the document correctly.
> >
> > Have also tried using the MutipleFieldQueryParser without success.
> >
> > The only query that works is, which is not correct as they are OR's
> > keyword:computers subject:IT content:xml
> >
> > Is anyone having the same problems
> >
> > Thanks in advance
> > Tate
> >
> >
> > --
> > To unsubscribe, e-mail:
> <ma...@jakarta.apache.org>
> > For additional commands, e-mail:
> <ma...@jakarta.apache.org>
> >
> 
> 
> --
> To unsubscribe, e-mail:  
> <ma...@jakarta.apache.org>
> For additional commands, e-mail:
> <ma...@jakarta.apache.org>
> 


__________________________________________________
Do You Yahoo!?
Yahoo! Movies - coverage of the 74th Academy Awards�
http://movies.yahoo.com/

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Multiple field searching

Posted by Kelvin Tan <ke...@relevanz.com>.
Tate,

The correct syntax is something like +(keyword:computers) -(subject:News).

HTH.

Maybe it would be helpful to add parse(String[] query, String[] fields,
Analyzer analyzer) methods into MultiFieldQueryParser? What do you think
Otis?

Kelvin
----- Original Message -----
From: "Tate Jones" <ta...@pisoftware.com>
To: "Lucene Users List" <lu...@jakarta.apache.org>
Sent: Wednesday, March 20, 2002 3:36 PM
Subject: Multiple field searching


> hi,
>
> I am trying to search across multiple fields using the following query
>
> +keyword:computers +subject:News content:xml
> or
> +(keyword:{computers}) +(subject:{News}) content:xml
>
> i have added the fields to the document correctly.
>
> Have also tried using the MutipleFieldQueryParser without success.
>
> The only query that works is, which is not correct as they are OR's
> keyword:computers subject:IT content:xml
>
> Is anyone having the same problems
>
> Thanks in advance
> Tate
>
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>
>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Multiple field searching

Posted by Kelvin Tan <ke...@relevanz.com>.
Tate,

<snip>
> Could not see how the MultiFieldQueryParser could take in multiple
queries. ie.  SUBJECT, KEYWORD & CONTENT field
> have different values to be queried.  It only takes a single query.

You're right in that it doesn't. What I'm wondering right now, is if that's
a reasonably common request to warrant its inclusion into the
MultiFieldQueryParser class...

Regards,
Kelvin

>
> On Wed, 20 Mar 2002 17:58, Otis Gospodnetic wrote:
> > I'm using MultiTermQueryParser and it works for me.
> >
> > Otis
> >
> > --- Tate Jones <ta...@pisoftware.com> wrote:
> > > hi,
> > >
> > > I am trying to search across multiple fields using the following
> > > query
> > >
> > > +keyword:computers +subject:News content:xml
> > > or
> > > +(keyword:{computers}) +(subject:{News}) content:xml
> > >
> > > i have added the fields to the document correctly.
> > >
> > > Have also tried using the MutipleFieldQueryParser without success.
> > >
> > > The only query that works is, which is not correct as they are OR's
> > > keyword:computers subject:IT content:xml
> > >
> > > Is anyone having the same problems
> > >
> > > Thanks in advance
> > > Tate
> > >
> > >
> > > --
> > > To unsubscribe, e-mail:
> > > <ma...@jakarta.apache.org>
> > > For additional commands, e-mail:
> > > <ma...@jakarta.apache.org>
> >
> > __________________________________________________
> > Do You Yahoo!?
> > Yahoo! Sports - live college hoops coverage
> > http://sports.yahoo.com/
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>
>
>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


searching with a '/'

Posted by Tate Jones <ta...@pisoftware.com>.
If i attempt a search that contains a forward slash '/' the following 
exception occurs

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: searching with a '/'

Posted by Otis Gospodnetic <ot...@yahoo.com>.
I remember a NPE in some seek method, and I think that was fixed.
Is this the latest version?  Compiling with debug flag turned off will
show line numbers.
Otis

--- Tate Jones <ta...@pisoftware.com> wrote:
> Gee KMail is crazy at times
> 
> On Thu, 21 Mar 2002 11:08, Tate Jones wrote:
> > If i attempt a search that contains a forward slash '/' the
> following
> > exception occurs
> 
>  <testcase name="testFullTextStringPool" time="3.59">
>     <error 
> type="java.lang.NullPointerException">java.lang.NullPointerException
>   at org.apache.lucene.index.SegmentTermPositions.seek(Unknown
> Source)
>   at org.apache.lucene.index.SegmentTermDocs.seek(Unknown Source)
>   at org.apache.lucene.index.SegmentsTermDocs.termDocs(Unknown
> Source)
>   at org.apache.lucene.index.SegmentsTermDocs.next(Unknown Source)
>   at org.apache.lucene.search.PhrasePositions.next(Unknown Source)
>   at org.apache.lucene.search.PhrasePositions.&lt;init&gt;(Unknown
> Source)
>   at org.apache.lucene.search.PhraseScorer.&lt;init&gt;(Unknown
> Source)
>   at org.apache.lucene.search.ExactPhraseScorer.&lt;init&gt;(Unknown
> Source)
>   at org.apache.lucene.search.PhraseQuery.scorer(Unknown Source)
>   at org.apache.lucene.search.BooleanQuery.scorer(Unknown Source)
>   at org.apache.lucene.search.Query.scorer(Unknown Source)
>   at org.apache.lucene.search.IndexSearcher.search(Unknown Source)
>   at org.apache.lucene.search.Hits.getMoreDocs(Unknown Source)
>   at org.apache.lucene.search.Hits.&lt;init&gt;(Unknown Source)
>   at org.apache.lucene.search.Searcher.search(Unknown Source)
>   at org.apache.lucene.search.Searcher.search(Unknown Source)
> 
> Any ideas on how to escape the forward slash.
> 
> The string added was successful
> "this/is/a/test/for/slashes"
> 
> I then tried to search for 
> "this/is/a/test/for/slashes"
> 
> then the exception occurred.
> 
> Thanks
> Tate
> 
> 
> 
> 
> --
> To unsubscribe, e-mail:  
> <ma...@jakarta.apache.org>
> For additional commands, e-mail:
> <ma...@jakarta.apache.org>
> 


__________________________________________________
Do You Yahoo!?
Yahoo! Movies - coverage of the 74th Academy Awards�
http://movies.yahoo.com/

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: searching with a '/'

Posted by Tate Jones <ta...@pisoftware.com>.
Gee KMail is crazy at times

On Thu, 21 Mar 2002 11:08, Tate Jones wrote:
> If i attempt a search that contains a forward slash '/' the following
> exception occurs

 <testcase name="testFullTextStringPool" time="3.59">
    <error 
type="java.lang.NullPointerException">java.lang.NullPointerException
  at org.apache.lucene.index.SegmentTermPositions.seek(Unknown Source)
  at org.apache.lucene.index.SegmentTermDocs.seek(Unknown Source)
  at org.apache.lucene.index.SegmentsTermDocs.termDocs(Unknown Source)
  at org.apache.lucene.index.SegmentsTermDocs.next(Unknown Source)
  at org.apache.lucene.search.PhrasePositions.next(Unknown Source)
  at org.apache.lucene.search.PhrasePositions.&lt;init&gt;(Unknown Source)
  at org.apache.lucene.search.PhraseScorer.&lt;init&gt;(Unknown Source)
  at org.apache.lucene.search.ExactPhraseScorer.&lt;init&gt;(Unknown Source)
  at org.apache.lucene.search.PhraseQuery.scorer(Unknown Source)
  at org.apache.lucene.search.BooleanQuery.scorer(Unknown Source)
  at org.apache.lucene.search.Query.scorer(Unknown Source)
  at org.apache.lucene.search.IndexSearcher.search(Unknown Source)
  at org.apache.lucene.search.Hits.getMoreDocs(Unknown Source)
  at org.apache.lucene.search.Hits.&lt;init&gt;(Unknown Source)
  at org.apache.lucene.search.Searcher.search(Unknown Source)
  at org.apache.lucene.search.Searcher.search(Unknown Source)

Any ideas on how to escape the forward slash.

The string added was successful
"this/is/a/test/for/slashes"

I then tried to search for 
"this/is/a/test/for/slashes"

then the exception occurred.

Thanks
Tate




--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Multiple field searching

Posted by Tate Jones <ta...@pisoftware.com>.
Thanks for all your help.

The only way i could get it to work was the following

      BooleanQuery bQuery = new BooleanQuery();

      TermQuery tSubject   = new TermQuery( new Term( SUBJECT_KEY, subject ));
      TermQuery tKeyword = new TermQuery( new Term( KEYWORD_KEY,  keyword ));

      bQuery.add( tSubject, true, false );
      bQuery.add( tkeyword, true, false );

      Query qContent = QueryParser.parse( literal, CONTENT_KEY, analyzer );
      bQuery.add( qContent, false, false );

      //Perform query
      hits = indexSearcher.search(bQuery);

      // debug logging
      if (logger.isDebugEnabled()) {

        logger.debug("Searching the fulltext string index pool with '" +
          bQuery.toString(CONTENT_KEY)+"'" );
      }

Could not see how the MultiFieldQueryParser could take in multiple queries. ie.  SUBJECT, KEYWORD & CONTENT field
have different values to be queried.  It only takes a single query.

On Wed, 20 Mar 2002 17:58, Otis Gospodnetic wrote:
> I'm using MultiTermQueryParser and it works for me.
>
> Otis
>
> --- Tate Jones <ta...@pisoftware.com> wrote:
> > hi,
> >
> > I am trying to search across multiple fields using the following
> > query
> >
> > +keyword:computers +subject:News content:xml
> > or
> > +(keyword:{computers}) +(subject:{News}) content:xml
> >
> > i have added the fields to the document correctly.
> >
> > Have also tried using the MutipleFieldQueryParser without success.
> >
> > The only query that works is, which is not correct as they are OR's
> > keyword:computers subject:IT content:xml
> >
> > Is anyone having the same problems
> >
> > Thanks in advance
> > Tate
> >
> >
> > --
> > To unsubscribe, e-mail:
> > <ma...@jakarta.apache.org>
> > For additional commands, e-mail:
> > <ma...@jakarta.apache.org>
>
> __________________________________________________
> Do You Yahoo!?
> Yahoo! Sports - live college hoops coverage
> http://sports.yahoo.com/

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Multiple field searching

Posted by Otis Gospodnetic <ot...@yahoo.com>.
I'm using MultiTermQueryParser and it works for me.

Otis

--- Tate Jones <ta...@pisoftware.com> wrote:
> hi,
> 
> I am trying to search across multiple fields using the following
> query
> 
> +keyword:computers +subject:News content:xml
> or
> +(keyword:{computers}) +(subject:{News}) content:xml
> 
> i have added the fields to the document correctly. 
> 
> Have also tried using the MutipleFieldQueryParser without success.
> 
> The only query that works is, which is not correct as they are OR's
> keyword:computers subject:IT content:xml
> 
> Is anyone having the same problems
> 
> Thanks in advance
> Tate
> 
> 
> --
> To unsubscribe, e-mail:  
> <ma...@jakarta.apache.org>
> For additional commands, e-mail:
> <ma...@jakarta.apache.org>
> 


__________________________________________________
Do You Yahoo!?
Yahoo! Sports - live college hoops coverage
http://sports.yahoo.com/

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Multiple field searching

Posted by Tate Jones <ta...@pisoftware.com>.
hi,

I am trying to search across multiple fields using the following query

+keyword:computers +subject:News content:xml
or
+(keyword:{computers}) +(subject:{News}) content:xml

i have added the fields to the document correctly. 

Have also tried using the MutipleFieldQueryParser without success.

The only query that works is, which is not correct as they are OR's
keyword:computers subject:IT content:xml

Is anyone having the same problems

Thanks in advance
Tate


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Lucene Bugs

Posted by Dmitry Serebrennikov <dm...@earthlink.net>.
Otis Gospodnetic wrote:

>
>I just took a quick look.
>TermInfosReader uses SegmentTermEnum, which extends TermEnums, which
>has abstract term() and next().
>Perhaps SegmentTermEnum implements term() and next() differently, so
>that next() does need to be called first.
>
Except when the TermEnum is by calling IndexReader.terms(Term t) , such 
that it is supposed to start after the given term. In that case, the 
code that creates the TermEnum and scrolls it to the requested point, in 
effect, already calls the "next()" for you. Yes, it's confusing as heck 
:), but this is the exception case that I think you may be referring to.

Dmitry.



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Lucene Bugs

Posted by Otis Gospodnetic <ot...@yahoo.com>.
Hello,

--- David Smiley <da...@verizon.net> wrote:
> 
> On Tuesday, March 19, 2002, at 10:32  PM, Otis Gospodnetic wrote:
> 
> > Hello,
> >
> > --- David Smiley <da...@verizon.net> wrote:
> >> I have reported bugs about Lucene in the fall of 2001 but no
> Lucene
> >> developer has responded.  I am sending this summary as a reminder.
> >>
> >> My original message to the mailing list is here:
> >>
> >> [Lucene-dev] More bugs
> >> http://www.geocrawler.com/archives/3/2626/2001/8/0/6409669/
> >>
> >> The bugs at SourceForge are here:
> >>
> >> DateFilter: call enum.next() first
> >
> > DateFilter.java has changed since the report, but I think I found
> the
> > piece of code that you were referring to.
> > After looking at DateFilter, TermEnum, and FilteredTermEnum it
> seems to
> > me that next() does not need to be called first.  This is not
> > java.util.Enumeration enum, it is TermEnum's enum.
> >
> > Also, if you look at methods next() and term() in FilteredTermEnum
> > you'll see that term() does need to be called first, otherwise the
> > first term would get skipped.
> 
> Hmmm, ok.  So this next()-method design pattern that Lucene is using 
> here is not the same as how Enumeration/Iterator/ResultSet works... 
> ok; water under the bridge.  I used the "find usages" feature of my 
> IDE ("IDEA" by IntelliJ/Netbrains) on the TermEnum.next() method just

I need to teach Xemacs (hello Eugene) to do the same...

> now to see how other callers work with this method.  Your findings 
> are correct.  I did find one caller that appears to not call it 
> correctly however: TermInfosReader.readIndex() line 111.  If it is 
> calling it correctly in this case for some obscure exceptional reason
> 
> then there is documentation missing to explain why.

I just took a quick look.
TermInfosReader uses SegmentTermEnum, which extends TermEnums, which
has abstract term() and next().
Perhaps SegmentTermEnum implements term() and next() differently, so
that next() does need to be called first.

> Anyway, the reason I first thought that this was a bug was because 
> term() returned null and DateFilter.bits() was expecting it not to.  
> It thus seems that that a bug does remain, and it is that 
> DateFilter.bits() does not handle cases in which there are no terms 
> to iterate over.

Could you please provide a self-contained test case that demonstrates
this?

Thanks,
Otis


__________________________________________________
Do You Yahoo!?
Yahoo! Sports - live college hoops coverage
http://sports.yahoo.com/

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Lucene Bugs

Posted by David Smiley <da...@verizon.net>.
On Tuesday, March 19, 2002, at 10:32  PM, Otis Gospodnetic wrote:

> Hello,
>
> --- David Smiley <da...@verizon.net> wrote:
>> I have reported bugs about Lucene in the fall of 2001 but no Lucene
>> developer has responded.  I am sending this summary as a reminder.
>>
>> My original message to the mailing list is here:
>>
>> [Lucene-dev] More bugs
>> http://www.geocrawler.com/archives/3/2626/2001/8/0/6409669/
>>
>> The bugs at SourceForge are here:
>>
>> DateFilter: call enum.next() first
>
> DateFilter.java has changed since the report, but I think I found the
> piece of code that you were referring to.
> After looking at DateFilter, TermEnum, and FilteredTermEnum it seems to
> me that next() does not need to be called first.  This is not
> java.util.Enumeration enum, it is TermEnum's enum.
>
> Also, if you look at methods next() and term() in FilteredTermEnum
> you'll see that term() does need to be called first, otherwise the
> first term would get skipped.

Hmmm, ok.  So this next()-method design pattern that Lucene is using 
here is not the same as how Enumeration/Iterator/ResultSet works... 
ok; water under the bridge.  I used the "find usages" feature of my 
IDE ("IDEA" by IntelliJ/Netbrains) on the TermEnum.next() method just 
now to see how other callers work with this method.  Your findings 
are correct.  I did find one caller that appears to not call it 
correctly however: TermInfosReader.readIndex() line 111.  If it is 
calling it correctly in this case for some obscure exceptional reason 
then there is documentation missing to explain why.

Anyway, the reason I first thought that this was a bug was because 
term() returned null and DateFilter.bits() was expecting it not to.  
It thus seems that that a bug does remain, and it is that 
DateFilter.bits() does not handle cases in which there are no terms 
to iterate over.

~ David Smiley


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Lucene Bugs

Posted by David Smiley <da...@verizon.net>.
On Tuesday, March 19, 2002, at 10:32  PM, Otis Gospodnetic wrote:

> Hello,
>
> --- David Smiley <da...@verizon.net> wrote:
>> I have reported bugs about Lucene in the fall of 2001 but no Lucene
>> developer has responded.  I am sending this summary as a reminder.
>>
>> My original message to the mailing list is here:
>>
>> [Lucene-dev] More bugs
>> http://www.geocrawler.com/archives/3/2626/2001/8/0/6409669/
>>
>> The bugs at SourceForge are here:
>>
>> DateFilter: call enum.next() first
>
> DateFilter.java has changed since the report, but I think I found the
> piece of code that you were referring to.
> After looking at DateFilter, TermEnum, and FilteredTermEnum it seems to
> me that next() does not need to be called first.  This is not
> java.util.Enumeration enum, it is TermEnum's enum.
>
> Also, if you look at methods next() and term() in FilteredTermEnum
> you'll see that term() does need to be called first, otherwise the
> first term would get skipped.

Hmmm, ok.  So this next()-method design pattern that Lucene is using 
here is not the same as how Enumeration/Iterator/ResultSet works... 
ok; water under the bridge.  I used the "find usages" feature of my 
IDE ("IDEA" by IntelliJ/Netbrains) on the TermEnum.next() method just 
now to see how other callers work with this method.  Your findings 
are correct.  I did find one caller that appears to not call it 
correctly however: TermInfosReader.readIndex() line 111.  If it is 
calling it correctly in this case for some obscure exceptional reason 
then there is documentation missing to explain why.

Anyway, the reason I first thought that this was a bug was because 
term() returned null and DateFilter.bits() was expecting it not to.  
It thus seems that that a bug does remain, and it is that 
DateFilter.bits() does not handle cases in which there are no terms 
to iterate over.

~ David Smiley


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>