RE: Enabling indexing of hyphenated terms sans the hyphen

2011-09-19 Thread Steven A Rowe
Hi sbs, Solr's WordDelimiterFilterFactory does what you want. You can see a description of its function here: . WordDelimiterFilter, the filter class implementing the above factory's functionality, is

Enabling indexing of hyphenated terms sans the hyphen

2011-09-19 Thread SBS
We use StandardTokenizer and this works well but we also need to include terms in our index which consist of hyphenated terms with the hyphen removed. So, for example, if the text being indexed contains "self-induced" we need the terms "self", "induced" and "selfinduced" to be indexed. How would

RE: Extracting all documents for a given search

2011-09-19 Thread Uwe Schindler
> Ahem, sorry. I quoted an old answer of mine, but HitCollector has been gone > for a while now... > This is the modern version: > > final ArrayList docs = new ArrayList(); > searcher.search( query, new Collector() { private int docBase; *// ignore > scorer* > >public void setScorer(Scorer s

Re: Extracting all documents for a given search

2011-09-19 Thread Israel Tsadok
Ahem, sorry. I quoted an old answer of mine, but HitCollector has been gone for a while now... This is the modern version: final ArrayList docs = new ArrayList(); searcher.search( query, new Collector() { private int docBase; *// ignore scorer* public void setScorer(Scorer scorer) { }

Re: Extracting all documents for a given search

2011-09-19 Thread Toke Eskildsen
On Sat, 2011-09-17 at 03:57 +0200, Charlie Hubbard wrote: > I really just want to be called back when a new document is found by the > searcher, and I can load the Document, find my object, and drop that to a > file. I thought that's essentially what a Collector is, being an interface > that is c

Re: Extracting all documents for a given search

2011-09-19 Thread Israel Tsadok
If you just want to fetch all the matching documents for a given query, implement a collector that just saves the document data. final ArrayList docs = new ArrayList(); searcher.search( query, new HitCollector() { public void collect(int doc, float score) { docs.add(searcher.doc(doc));