Re: some basic questions on how Lucene/search engines work

2011-04-13 Thread Yang
thanks a lot for the detailed info! On Wed, Apr 13, 2011 at 4:43 AM, Grant Ingersoll wrote: > > On Apr 7, 2011, at 9:17 PM, Yang wrote: > >> I'm new to lucene/search engine , and have been struggling with these >> questions recently. >> I'd appreciate a lot of you could shed some light on this. >

Re: Update Document based on Query instead of Term

2011-04-13 Thread David Causse
On Wed, Apr 13, 2011 at 09:15:15AM -0400, Pulkit Singhal wrote: > Lucene's IndexWriter allows users to update documents by Term via this > method signature: > void updateDocument(Term term, Document doc) > > But what about updating them by Query? Like so: > void updateDocument(Query query, Documen

Re: Update Document based on Query instead of Term

2011-04-13 Thread Anshum
So Update basically is nothing but delete and add (a fresh doc). You could just go ahead at using the deletedocument(Query query) function and then adding the new document? That is the general approach for such cases and it works just about fine. -- Anshum Gupta http://ai-cafe.blogspot.com On We

Update Document based on Query instead of Term

2011-04-13 Thread Pulkit Singhal
Lucene's IndexWriter allows users to update documents by Term via this method signature: void updateDocument(Term term, Document doc) But what about updating them by Query? Like so: void updateDocument(Query query, Document doc) 1) How can this be done? As far as I know there is no such method si

Re: some basic questions on how Lucene/search engines work

2011-04-13 Thread Grant Ingersoll
On Apr 7, 2011, at 9:17 PM, Yang wrote: > I'm new to lucene/search engine , and have been struggling with these > questions recently. > I'd appreciate a lot of you could shed some light on this. > > > let's say I do a query on > > dog greyhound > > note that I did not quote them, i.e. this

AW: German*Filter, Analyzer "cutting" off letters from (french) words...

2011-04-13 Thread Clemens Wyss
This is what I was looking for, thanks > -Ursprüngliche Nachricht- > Von: Robert Muir [mailto:rcm...@gmail.com] > Gesendet: Mittwoch, 13. April 2011 12:11 > An: java-user@lucene.apache.org > Betreff: Re: German*Filter, Analyzer "cutting" off letters from (french) > words... > > If you onl

Re: German*Filter, Analyzer "cutting" off letters from (french) words...

2011-04-13 Thread Robert Muir
If you only want to ignore german stopwords, you don't need to use the german analyzer with german stemming. you can just use StandardAnalyzer with your own stopwords set! On Wed, Apr 13, 2011 at 3:51 AM, Clemens Wyss wrote: > What I really want to do is ignore german stop words such as "der", "d

Re: German*Filter, Analyzer "cutting" off letters from (french) words...

2011-04-13 Thread Simon Willnauer
On Wed, Apr 13, 2011 at 11:03 AM, Clemens Wyss wrote: > I tried: > Set stemsToBeIgnored = new HashSet(Arrays.asList( "e" )); > GermanAnalyzer ga = new GermanAnalyzer( Version.LUCENE_31, > GermanAnalyzer.getDefaultStopSet(), stemsToBeIgnored ); try Arrays.asList("der", "die", "das", "ein"); or d

Re: German*Filter, Analyzer "cutting" off letters from (french) words...

2011-04-13 Thread Simon Willnauer
On Wed, Apr 13, 2011 at 9:51 AM, Clemens Wyss wrote: > What I really want to do is ignore german stop words such as "der", "die", > "das", "ein",... GermanAnalyzer takes a stemExclusionSet if you put those terms into this set the stemmer will not touch them. This should be in 3.1 I think public

AW: German*Filter, Analyzer "cutting" off letters from (french) words...

2011-04-13 Thread Clemens Wyss
What I really want to do is ignore german stop words such as "der", "die", "das", "ein",... > -Ursprüngliche Nachricht- > Von: Robert Muir [mailto:rcm...@gmail.com] > Gesendet: Dienstag, 12. April 2011 17:03 > An: java-user@lucene.apache.org > Betreff: Re: German*Filter, Analyzer "cutting