yes, this might be a way, but in my case it would not work:
The probles is, that I have to return an exceprt (snippet) and the words to
be highlighted as two separate strings. So now I use highlighter and
getBestFragment to extract the excerpt, then I remove the inserted html tags
and return the
Fisheye wrote:
HashSet terms = new HashSet();
query.rewrite(reader).extractTerms(terms);
Ok, but this delivers every term, not just a list of words the Levenshtein
algorithm produced with similarity.
I asked a similar thing in the past about term highlighting in general,
and
HashSet terms = new HashSet();
query.rewrite(reader).extractTerms(terms);
Ok, but this delivers every term, not just a list of words the Levenshtein
algorithm produced with similarity. Regarding to the posts here in my opened
thread, you guis seem to be experienced programmers so
mark harwood wrote:
Isn't that what Query.extractTerms is for? Isn't it
implimented by all primitive Queries?..
As of last week, yes. I changed the SpanQueries to
implement this method and then refactored the
Highlighter package's QueryTermExtractor to make use
of this (it radically simplified
>Isn't that what Query.extractTerms is for? Isn't it
>implimented by all primitive Queries?..
As of last week, yes. I changed the SpanQueries to
implement this method and then refactored the
Highlighter package's QueryTermExtractor to make use
of this (it radically simplified the code in there).
: > Well, a roundabout way is to simply create a FuzzyQuery, rewrite it,
: > cast it to a BooleanQuery and use the BooleanQuery API to extract the
: > TermQuery objects and the Term within the TermQuery has what you're
...
: We take an approach somewhere down the middle...
...
:
Erik Hatcher wrote:
On Apr 4, 2006, at 11:23 AM, Fisheye wrote:
Probably, do you know if there is a possibility to get the similar words
generated by the algorithm when doing fuzzy search?
Well, a roundabout way is to simply create a FuzzyQuery, rewrite it,
cast it to a BooleanQuery and use
On Apr 4, 2006, at 11:23 AM, Fisheye wrote:
Probably, do you know if there is a possibility to get the similar
words
generated by the algorithm when doing fuzzy search?
Well, a roundabout way is to simply create a FuzzyQuery, rewrite it,
cast it to a BooleanQuery and use the BooleanQuery A
ok, thank Erik, now it works :-)
Probably, do you know if there is a possibility to get the similar words
generated by the algorithm when doing fuzzy search?
Cheers
Simon Dietschi
--
View this message in context:
http://www.nabble.com/highlighting---fuzzy-search-t1392775.html#a3746483
Sent fro
So, just like I said call Query.rewrite() and pass the returned
Query to the Highlighter, not the original FuzzyQuery. I believe the
javadocs for Highlighter even mention this? Or at least its an FAQ
that hopefully is on the wiki or easily findable somehow.
Erik
On Apr 4, 2
Ok, thanks Erik. So probably my code may explain it:
---
public void searchQuery(String q, float rel, String indexDir){
String excerpt = "";
On Apr 4, 2006, at 8:30 AM, Fisheye wrote:
Is it possible to get back a highlighted text "snippet" when using
fuzzy
search? I mean where does lucene stores the similar words to the
search
query? If I know where these words are, I can use one of these
words to
highlight.
You mean using a
12 matches
Mail list logo