Hi all,
I'm using highlighter with TermQuery and RegexQuery and everything works
well.
As soon as I try to use IntervalQuery, the highlighter returns no fragment.
Does someone know if IntervalQuery is supported with Highlighter /
QueryScorer?
Thanks,
Jean
I am having a problem with ElasticSearch 7.9.1 which seems to be caused by
Lucene 8.6.2. If I perform a search with >288 filter terms using the
unified highlighter I get a too_complex_to_determinize_exception error but
if I switch to the plain highlighter it works fine. Is this a bug or am I
do
Hello,
I am searching exact phrase say "Jane Doe", there are two instances of this
in the text. My highlighter is only outputting the first instance and not
the second one. Can someone please help me understand the issue and how to
fix it, any help would be highly appreciated. Part of
o wrote:
> Hi,
>
> I have the following code:
>
> *QueryScorer scorer = new QueryScorer(query, "context");*
> *Highlighter highlighter = new Highlighter(scorer);*
> *String fragment = highlighter.getBestFragment(new StandardAnalyzer(),
> "content", hDoc.g
Hi,
I have the following code:
*QueryScorer scorer = new QueryScorer(query, "context");*
*Highlighter highlighter = new Highlighter(scorer);*
*String fragment = highlighter.getBestFragment(new StandardAnalyzer(),
"content", hDoc.getContent());*
but I get the following error
It would help tremendously if you can give a specific code example showing
the problem.
On Thu, Jun 2, 2016 at 6:41 AM Sascha Janz wrote:
>
> we use highlighter to get textfragments for our hit list.
>
> the code is straight forward like this
>
>Analyzer analyzer = ne
we use highlighter to get textfragments for our hit list.
the code is straight forward like this
Analyzer analyzer = new StandardAnalyzer(;
QueryParser parser = new QueryParser( "content", analyzer);
Highlighter highlighter = new Highlighter(new
QueryScorer(parser.pa
you open a JIRA ticket?
>
> Alan Woodward
> www.flax.co.uk
>
>
>> On 18 Apr 2016, at 16:27, Eva Popenda wrote:
>>
>> Hi,
>>
>> I have a problem when using the Highlighter with N-GramAnalyzer and
>> PhraseQuery:
>> Searching for a sub
> I have a problem when using the Highlighter with N-GramAnalyzer and
> PhraseQuery:
> Searching for a substring with length = N (4 in my case) yields the following
> exception:
>
> java.lang.IllegalArgumentException: Less than 2 subSpans.size():1
> at
> org.apache.
Hi,
I have a problem when using the Highlighter with N-GramAnalyzer and PhraseQuery:
Searching for a substring with length = N (4 in my case) yields the following
exception:
java.lang.IllegalArgumentException: Less than 2 subSpans.size():1
at
org.apache.lucene.search.spans.ConjunctionSpans
ttached
that attempts to solve the issue.
For now I have given up. I'm assuming that most of the Lucene community
just doesn't use that highlighter anymore. It is also difficult to
reproduce the issue, so it probably doesn't cause a problem all that often.
It isn't worth my
Seems we are encountering same problem. (thread: bug of
highlighter/SimpleSpanFragmenter,
returned longer fragment than expected?)
When debugging, your fragmenter is SimpleSpanFragmenter? isNewFragment()
returns true due to below logic?
boolean isNewFrag = offsetAtt.endOffset() >= (fragmentS
anTermQuery(new Term(FIELD_NAME, "cats")));
> QueryScorer queryScorer = new QueryScorer(query, FIELD_NAME);
> Highlighter highlighter = new Highlighter(queryScorer);
> // Highlighter highlighter = new Highlighter(new
> QueryTermScorer(query));
> highlighter.setTextFra
void testSimpleQueryTermScorerHighlighter() throws Exception {
doSearching(new SpanTermQuery(new Term(FIELD_NAME, "cats")));
QueryScorer queryScorer = new QueryScorer(query, FIELD_NAME);
Highlighter highlighter = new Highlighter(queryScorer);
// Highlighter highlighter = new
Hey everyone,
I ran into an issue with the standard highlighter in 4.10.4 and was hoping
that someone could help. I'm attempting to fragment a result based on a
SpanNearQuery. If the words in the query are next to each other, the
fragmenter will often return one large result containing the e
Hello,
I'm not sure if this is the correct approach, so please let me know if there is
a better way to accomplish the following task
I am attempting to search an entire database for a keyword. To do this, I
indexed all the data fields into a single "content" field with a delimiter
between each
Hey All,
i have a use case where users search my index for single chars like"A".
Those Identifiers are contained in a special span in my html doc so
indexing is working fine and i only get the hits i am looking for.
But for the highlighting i am stuck...
The highlighter will highligh
on is:
- is this really a bug? or am I overlooking something?
- if this is a bug, why was it closed with "wont't fix"? why wasn't the
patch applied?
--
View this message in context:
http://lucene.472066.n3.nabble.com/Highlighter-SimpleSpanFragmenter-bug-tp4178725.html
Sent fro
Hi,
I'm using FastVectorHighlighter, and I wanted to get highlights from
multiple fields that matched, so I called `highlighter.getBestFragment` for
each field. It returns null if it had nothing for that field. The problem
is the colors don't match, so it looks confusing. For example, I search
f
Hi Mike,
I indexed 1 GB document with postingshighlighter and Fast Vector
Highlighter.
To my Surprise PostingsHighlighter took almost 1.6 times
FastVectorHighlighter..
I thought storing document offset will take less space compared to Storing
Term Vector.
On Mon, Nov 25, 2013 at 7:04 PM
m
On Mon, Nov 25, 2013 at 6:43 AM, VIGNESH S wrote:
> Hi,
>
> I tried indexing for PostingsHighligher with
> TextField."TYPE_NOT_STOREDTYPE_STORED" and used postings highlighter..iam
> getting null pointer Exception.
>
> But if i use TextField.TYPE_STORED
Hi,
I tried indexing for PostingsHighligher with
TextField."TYPE_NOT_STOREDTYPE_STORED" and used postings highlighter..iam
getting null pointer Exception.
But if i use TextField.TYPE_STORED it is working properly..
can,t i use postingshighlighter without storing ?.Please kindly Help.
Hi,
I would like to use the postings highlighter to highlight a whole field,
therefore I'm using the WholeBreakIterator. But if the field has multiple
values, I get a single snippet (with the chosen multiValuedSeparator
between the different values), while I would like to get a highlighted
sn
^5 ;)
On Mon, Mar 25, 2013 at 11:02 PM, Bushman, Lamont wrote:
> Thank you very much for the help Simon. I am amazed I was able to accomplish
> what I wanted. I didn't store the body in the Index. And I used Highlighter
> to return the best fragments by parsing my ori
Thank you very much for the help Simon. I am amazed I was able to accomplish
what I wanted. I didn't store the body in the Index. And I used Highlighter
to return the best fragments by parsing my original document.
From: Simon Willnauer [simon.w
ld it be feasible (time) to not store TermVectors or Store the
> field at all until the user searches for a document. Then at runtime I can
> re-index the top docs from the original documents in RAM and use Highlighter
> to return fragments?
this is what the highlighter does if you are
l the user searches for a document. Then at runtime I can re-index the top
docs from the original documents in RAM and use Highlighter to return fragments?
Thanks
Woops, please ignore this. There is a mixed version of jar file... Sorry
about this.
Regards
--
Bin Lan
Software Developer
Perimeter E-Security
O - (203)541-3412
Follow Us on Twitter: www.twitter.com/PerimeterNews
Read Our Blog: security.perimeterusa.com/blog
On Thu, Dec 27, 2012 at 3:39 PM
We have a section of code that does the text highlight, it was running fine
under lucene 1.9.1, but we are getting the following error after upgrade to
3.6.1. It does not seem to be anything that we have control of. any body
have any suggestion on how to fix this?
Exception while trying to select
On Tue, 2012-12-04 at 17:30 +0530, madan mp wrote:
> I am working with lucene 3.6 ,I am trying to use the highlighter 3.6 in my
> search engine code, can you pls provide me full code for highlighting the
> termspls..pls
>
>
> regards
> madan
Hi,
not a complete
Hi folks,
Is there a reason why the setMaxDocCharsToAnalyze() method of
WeightedSpanTermExtractor() is protected?
The class is a perfect fit for my requirement (enumerating the list of
terms present in a document that match the current query for subsequent
highlighting in a PDF file) with th
-
> From:Thomas Matthijs
> Sent: Thu 04-Oct-2012 15:55
> To: java-user@lucene.apache.org
> Subject: Re: Highlighter IOOBE with modified
> HyphenationCompoundWordTokenFilter
>
> And to include the code
>
> On Thu, Oct 4, 2012 at 3:52 PM, Markus Jelsma
> wrote:
> &
And to include the code
On Thu, Oct 4, 2012 at 3:52 PM, Markus Jelsma
wrote:
> I forgot to add that this is with today's build of trunk.
>
> -Original message-
>> From:Markus Jelsma
>> Sent: Thu 04-Oct-2012 15:42
>> To: java-user@lucene.apache.org
&g
I forgot to add that this is with today's build of trunk.
-Original message-
> From:Markus Jelsma
> Sent: Thu 04-Oct-2012 15:42
> To: java-user@lucene.apache.org
> Subject: Highlighter IOOBE with modified HyphenationCompoundWordTokenFilter
>
> Hi,
input token. For example: verzekeringmaatschappij now becomes
verzekering and maatschappij and not verzekeringmaatschappij, ver, zeker,
verzeker, zekering, ringmaat, maat and more.
But it seem that i have done something wrong because my modified version
sometimes causes the Highlighter to
Steve,
Exactly the right question...
Prompted by your question, further investigation reveals that I need to
move the "access" part of my lucene query into a filter to prevent
non-matching documents getting scored.
In that situation of course the highlighter finds nothing to
Hi Dawn,
Can you give an example of a "partial match"?
Steve
-Original Message-
From: Dawn Zoë Raison [mailto:d...@digitorial.co.uk]
Sent: Friday, April 20, 2012 7:59 AM
To: java-user@lucene.apache.org
Subject: Highlighter and Shingles...
Hi,
Are there any notes on
Hi,
Are there any notes on making the highlighter work consistently with a
shingle generated index?
I have a situation where complete matches highlight OK, but partial
matches do not - leading to a number of blank previews...
Our analyser look like:
TokenStream result
Using the original org.apache.lucene.search.highlight.Highlighter should I be
able to give it a query like [ My AND Words AND "My Words"^100 ] (the actually
phrase in this query is converted to a span query with a slop 1),
and expect it find the fragment many pages into the file that has span "My
: Subject: highlighter: how can I get locations of fragments?
: References: <4ee79b27.1010...@wyona.com>
: In-Reply-To: <4ee79b27.1010...@wyona.com>
https://people.apache.org/~hossman/#threadhijack
Thread Hijacking on Mailing Lists
When starting a new discussion on a mailing list, p
I know how to get relevant highlighted fragments together with some surrounding
text using Lucene highlighter, namely, using
Highlighter highlighter = new Highlighter(scorer);
String[] fragments = highlighter.getBestFragments(stream,
fieldContents, fragmentNumber);
But
am=TokenSources.getTokenStream(tpv);
>
> String result =
> highlighter.getBestFragments(
> tokenStream, contents, 1, "...");
> System.out.println("\n" + result);
>
>
> }
>
> When I proint &qu
its[i].doc" I see that are not null.
The problem is in this line
"TermPositionVector tpv = (TermPositionVector)reader.getTermFreqVecto
(hits[i].doc,"contents"); "
hits[i].doc represent the Doc id or ?
Thanks
--
View this message in c
On Thu, Nov 24, 2011 at 11:21 AM, starz10de wrote:
> Hi,
>
> no hits are not null, I can print all retrieved docuemtns without problem.
>
> --
> View this message in context:
> http://lucene.472066.n3.nabble.com/highlighter-by-using-term-offsets-tp3527712p3533380.html
> Sen
Hi,
no hits are not null, I can print all retrieved docuemtns without problem.
--
View this message in context:
http://lucene.472066.n3.nabble.com/highlighter-by-using-term-offsets-tp3527712p3533380.html
Sent from the Lucene - Java Users mailing list archive at Nabble.com
:
>
> I'm writing a highlighter by using term offsets as follows:
>
>
> IndexReader reader = IndexReader.open( indexPath );
> TermPositionVector tpv = (TermPositionVector)reader.getTermFreqVector(
> hits[i].doc,"contents");
>
> Whe
I'm writing a highlighter by using term offsets as follows:
IndexReader reader = IndexReader.open( indexPath );
TermPositionVector tpv = (TermPositionVector)reader.getTermFreqVector(
hits[i].doc,"contents");
When I run the searcher, I face this error in
Ter
Hi
> Thanks for your useful comments:
>
> here I could do what I want with the highlighter which work with lucene 3:
>
> QueryScorer scorer = new QueryScorer(query, reader, "contents");
> Highlighter highlighter = new Highlighter(scorer);
&g
Hi,
Thanks for your useful comments:
here I could do what I want with the highlighter which work with lucene 3:
QueryScorer scorer = new QueryScorer(query, reader, "contents");
Highlighter highlighter = new Highlighter(scorer);
Strin
Hi,
You should review the new API of Lucene 3.0, SpanScorer was replaced by
something else. The CHANGES.txt of the contrib package may give you some hints.
Its long time ago that we changed this api (Lucene 3.0 is also "ancient").
Contrib-Highlighter may break backwards compatibility
Hi Uwe,
Thanks for your answer. I am using now lucene-highlighter-3.0.3 but the
problem I have this error:
“SpanScorer can’t be resolved as a type”
> SpanScorer scorer = new SpanScorer(query, fieldName, new
> CachingTokenFilter(stream));
I checked the class path and there were
...@thetaphi.de
> -Original Message-
> From: starz10de [mailto:farag_ah...@yahoo.com]
> Sent: Sunday, November 20, 2011 10:53 AM
> To: java-user@lucene.apache.org
> Subject: lucene highlighter
>
> Hi,
>
> I have a problem with lucene highlighter. I couldn’t mak
Hi,
I have a problem with lucene highlighter. I couldn’t make it run. The
compilation is without error but when I run it I got this error “Exception
in thread "main"
java.lang.NoSuchMethodError:org.apache.lucene.analysis.TokenStream.next(Lorg/apache/lucene/analysis/Token;)Lorg/apa
, 2011 at 12:08 AM, Michael Sokolov wrote:
> Lukas there really isn't any support for custom Query types in Highlighter,
> as you've found. If you inherit from one of the types it does support, or
> rewrite your query to one of them, that should work, but the Query class
> just
Lukas there really isn't any support for custom Query types in
Highlighter, as you've found. If you inherit from one of the types it
does support, or rewrite your query to one of them, that should work,
but the Query class just doesn't provide enough support for Highlighter
Hi,
What is the recommended way to use custom Query implementations with Lucene
(3.3.0) Highlighter framework?
In short, what worries me a bit is the fact
that WeightedSpanTermExtractor#extract(Query, Map)
accepts a general Query parameter but inside it does a lot of tests against
particular
Hi,
I'd like to make highlighting work as follows:
length(all snippits) approx. 200 chars
hl.snippits = 2 (2 snippits)
e.g. if there is only 1 snippet available, length <= 200chars
e.g. if there is >1 snippet, length each snippet == 100chars, so I
take the first 2 and get 200 chars
Is this pos
Hi,
I'd like to make highlighting work as follows:
length(all snippits) approx. 200 chars
hl.snippits = 2 (2 snippits)
e.g. if there is only 1 snippet available, length <= 200chars
e.g. if there is >1 snippet, length each snippet == 100chars, so I
take the first 2 and get 200 chars
Is this pos
The general and short answer is:
Highlighter: highlights more query types, has a fairly rich API, doesn't scale
well to very large documents (though
https://issues.apache.org/jira/browse/LUCENE-2939 is going to help a lot here)
- does not require that you store term vectors, but is fast
> implementation of
> > highlighters...
> > I saw the javadoc of FVH, but it only says "another implementation of
> Lucene
> > Highlighter" ...
>
> Description section in the javadoc shows the features of FVH:
>
>
> https://builds.apache.org/hudson/job/Luce
(11/04/01 21:32), shrinath.m wrote:
I was wondering whats the difference between the Lucene's 2 implementation of
highlighters...
I saw the javadoc of FVH, but it only says "another implementation of Lucene
Highlighter" ...
Description section in the javadoc shows the features
I was wondering whats the difference between the Lucene's 2 implementation of
highlighters...
I saw the javadoc of FVH, but it only says "another implementation of Lucene
Highlighter" ...
Can someone throw some more light on this ?
--
View this message in context:
http://l
another issue (apparently unrelated, but who knows ?) See
https://issues.apache.org/jira/browse/LUCENE-2874
Pierre
De : Cescy [mailto:ee07b...@gmail.com]
Envoyé : vendredi 18 mars 2011 07:32
À : java-user; Pierre GOSSE
Objet : Re:RE: About highlighter
Yes, I only search the "contents"
Ian Lea [mailto:ian@gmail.com]
Envoyé : mercredi 16 mars 2011 22:29
À : java-user@lucene.apache.org
Objet : Re: About highlighter
I know nothing about highlighting but that 500 looks like a good place
to start investigating.
--
Ian.
On Tue, Mar 15, 2011 at 8:47 PM, Cescy wrote:
> Hi,
I know nothing about highlighting but that 500 looks like a good place
to start investigating.
--
Ian.
On Tue, Mar 15, 2011 at 8:47 PM, Cescy wrote:
> Hi,
>
>
> My highlight code is shown as following:
>
>
> QueryScorer scorer = new QueryScorer(query);
> Highl
Hi,
My highlight code is shown as following:
QueryScorer scorer = new QueryScorer(query);
Highlighter highlighter = new Highlighter(simpleHTMLFormatter, scorer);
highlighter.setTextFragmenter(new SimpleSpanFragmenter(scorer, 500));
String contents = doc.get("contents");
T
Hi,
My highlight code is shown as following:
QueryScorer scorer = new QueryScorer(query);
Highlighter highlighter = new Highlighter(simpleHTMLFormatter, scorer);
highlighter.setTextFragmenter(new SimpleSpanFragmenter(scorer, 500));
String contents = doc.get("contents");
T
How to use it ? Example please ?
Regards
- Shrinath. M
--
View this message in context:
http://lucene.472066.n3.nabble.com/phrase-query-highlighter-spans-matching-tp828257p2653941.html
Sent from the Lucene - Java Users mailing list archive at Nabble.com.
t; Correct? And what about the other 2?
>
> *Q2*. Then I use the following code to get context of the search result.
> Note: the result must be ordered by relevance.
>
> Query q = new QueryParser(Version.LUCENE_30,"field",
> analyzer).parse(expression);
> QueryScor
ered by relevance.
Query q = new QueryParser(Version.LUCENE_30,"field",
analyzer).parse(expression);
QueryScorer scorer = new QueryScorer(query);
Highlighter highlighter = new Highlighter(scorer);
highlighter.setTextFragmenter(new SimpleSpanFragmenter(scorer, 500));
And there are something wrong in line 2 for the 4 kinds of queries. How can
I modify the code to get the snippet of the content?
Thanks.
ered by relevance.
Query q = new QueryParser(Version.LUCENE_30,"field",
analyzer).parse(expression);
QueryScorer scorer = new QueryScorer(query);
Highlighter highlighter = new Highlighter(scorer);
highlighter.setTextFragmenter(new SimpleSpanFragmenter(scorer, 500));
And there are something wrong in line 2 for the 4 kinds of queries. How can
I modify the code to get the snippet of the content?
Thanks.
ple there. The gist
> is that you create a MemoryIndex on the fly and index the doc in question
> into it, then you can get the IndexReader from the IndexSearcher associated
> with the MemoryIndex. All this is similar to how Highlighter works, and it
> looks like you have access to the o
d
with the MemoryIndex. All this is similar to how Highlighter works, and it
looks like you have access to the original input?
Now, this is largely a guess, so don't waste time if I'm really off base
with
this.
Best
Erick
On Tue, Nov 30, 2010 at 2:16 PM, Fabiano Nunes wrote:
> Ok
what I'm
> > expecting.
> > But, I'm concerned about the warning message in API docs (indeed, I think
> I
> > dont understand it). There is any other approach? Can I have the same
> > results retrieving the termPositions without performance issues?
> >
>
There is any other approach? Can I have the same
> results retrieving the termPositions without performance issues?
>
> Thanks.
>
> On Tue, Nov 30, 2010 at 1:20 PM, Fabiano Nunes wrote:
>
> > Hello,
> > I'm trying to retrieve payloads from the highligh
ance issues?
Thanks.
On Tue, Nov 30, 2010 at 1:20 PM, Fabiano Nunes wrote:
> Hello,
> I'm trying to retrieve payloads from the highlighteds terms by Highlighter
> class. In my tests, all terms returned from Highlighter has null as payload.
> Example:
>
> Highlighter h =
Hello,
I'm trying to retrieve payloads from the highlighteds terms by Highlighter
class. In my tests, all terms returned from Highlighter has null as payload.
Example:
Highlighter h = new Highlighter(new Formatter() {
public String highlightTerm(String originalText, TokenGroup tokenGroup) {
ping!
Any hope for help here?
I'm a bit stuck before deploying a release.
thanks in advance
paul
On 3 sept. 2010, at 14:05, Paul Libbrecht wrote:
>
> Hello list,
>
> I'm strugging again with the highlighter. I don't understand why I obtain
> sporadicall
Hello list,
I'm strugging again with the highlighter. I don't understand why I obtain
sporadically InvalidTokenOffsetsException.
The mission: given a query, detect which field was matched, among the names of
the concepts: there can be several names for a given concept, also in one
@lucene.apache.org
30.07.2010 Kopie
15:51
Thema
Re: Re: Highlighter wildcard
Because the highlighter only uses MemoryIndex if wildcards are involved? I
don't use the highlighter package so have no idea if that is correct or not,
but the message
java.lang.NoClassDefFoundError: org/apache/lucene/index/memory/MemoryIndex
is clear. The jvm can't find that class
Thema
Re: Highlighter wildcard problems:
Bitte NoClassDefFoundError in
antworten an Linux/CentOS 5.4, works in
,
>
> I'm using lucene for obvious purposes and I'm trying to highlight
> search-term results.
>
> libraries I use:
> lucene-core version: 3.0.2
> lucene-highlighter version: 3.0.2
>
> Dev-System:
> WinXP Pro 32Bit, jdk1.6.0_20,
> java version "1.6.0_
Hello everyone,
I'm using lucene for obvious purposes and I'm trying to highlight
search-term results.
libraries I use:
lucene-core version: 3.0.2
lucene-highlighter version: 3.0.2
Dev-System:
WinXP Pro 32Bit, jdk1.6.0_20,
java version
hi all
when use highlighter, We must provide a tokenStream and the
original text. To get a tokenStream, we can either reanlyze the
original text or use saved TermVector to reconstruct it.
In my application, highlight will cost average 200ms-300ms, and I
want to optimze it to lower than 100ms
Hi All,
We are mixing Lucene with a commercial service giving us all kinds of
synonyms. We add these synonyms to the index and we can search with
them. The problem we have is 'highlighting' the orginal word when a
synonym is found.
We were thinking along the following approach.
1. Get a term
2.
(10/05/19 13:58), Li Li wrote:
hi all,
I read lucene in action 2nd Ed. It says SimpleSpanFragmenter will
"make fragments that always include the spans matching each document".
And also a SpanScorer existed for this use. But I can't find any class
named SpanScorer in lucene 3.0.1. And the res
I'm trying to implement highlighting in my lucene application and I can't
get any fragment. getBestFragment always returns null.
My code:
QueryParser parser = new QueryParser(Version.LUCENE_30, "text",
myAnalyzer);
Query realQuery = parser.parse(query);
Highlight
hi all,
I read lucene in action 2nd Ed. It says SimpleSpanFragmenter will
"make fragments that always include the spans matching each document".
And also a SpanScorer existed for this use. But I can't find any class
named SpanScorer in lucene 3.0.1. And the result of HighlighterTest
class in c
10 4:21:35 PM
Subject: Re: Highlighter usage
That's the *StandartTokenizer*, which is not at all identical to
StandardAnalyzer. From
the Javadoc for StandardAnalyzer:
Filters
StandardTokenizer<http://lucene.apache.org/java/2_4_0/api/org/apache/lucene/analysis/standard/StandardTokenize
oken() and stem or is there a better way to use
> something like SnowballFilter?
>
>
>
>
> - Original Message
> From: Erick Erickson
> To: java-user@lucene.apache.org
> Sent: Thu, April 29, 2010 3:30:09 PM
> Subject: Re: Highlighter usage
>
> What analyzer are
em or is there a better way to use something
like SnowballFilter?
- Original Message
From: Erick Erickson
To: java-user@lucene.apache.org
Sent: Thu, April 29, 2010 3:30:09 PM
Subject: Re: Highlighter usage
What analyzer are you using at index time? My guess is something
What analyzer are you using at index time? My guess is something
like WhitespaceAnalyzer that doesn't stem or change case. Try
a different analyzer, SimpleAnalyzer comes to mind
HTH
Erick
On Thu, Apr 29, 2010 at 4:21 PM, Justin wrote:
> I'm trying to use Highlighter wit
I'm trying to use Highlighter with QueryScorer after reading:
https://issues.apache.org/jira/browse/LUCENE-1685
The problem is: I'm not getting a result unless my the query term is an exact
match. Am I missing filters? Is there a more complete example of how this
should work?
When I use a WildcardQuery with the highlighter, I don't get any fragments
back, I get null returned to strBetText. If I just use a term query then it
works.
TokenStream tokenStream = TokenSources.getTokenStream(indexReader, docId,
strFieldName);
QueryScorer scorer = new QueryScorer(
Yep that was it :-)
Thanks !
-Ursprüngliche Nachricht-
Von: Illés Solt [mailto:illes.s...@gmail.com]
Gesendet: Freitag, 29. Januar 2010 15:42
An: java-user@lucene.apache.org
Betreff: Re: Highlighter / cannot be instantiated
Are you sure you imported Highlighter from the correct lucene
Are you sure you imported Highlighter from the correct lucene namespace
org.apache.lucene.search.highlight.Highlighter
and not something else like javax.swing.text.Highlighter?
Illes
2010/1/28 Marc Schwarz :
> I'm trying to get the highlighter running, but didn't get it work.
&
I'm trying to get the highlighter running, but didn't get it work.
Everywhere it's posted as following:
Highlighter highlighter = new Highlighter(new SimpleHTMLFormatter(),
new QueryScorer(query));
but that gives me a
"Highlighter is abstract; cannot be instantiated".
changing MultiTermRewriteMethod fixed all previous incompatibility issue.
After setting this:
myQueryParser.setMultiTermRewriteMethod(MultiTermQuery.SCORING_BOOLEAN_QUERY_REWRITE);
highlighter get compatible with rewrite, query.rewrite().toString() works as
before and scoring works fine for
OK, to answer my own question:
I found from the following issue that if I do a query.rewrite(), highlighter
doesn't work.
https://issues.apache.org/jira/browse/LUCENE-1425
I did rewrite() in order to find all matched terms for example in a prefix
query, but as this doesn't work an
1 - 100 of 274 matches
Mail list logo