Here is the query, search for the term "ipod" on the "log" field
q=log%3Aipod+AND+requestid%3A1029+AND+logfilename%3Apayxdev-1245272062125-USS.log.zip&hl=true&hl.fl=log&hl.fl=message&hl.simple.post=%3Ci%3E&hl.simple.pre=%3C%2Fi%3E&hl.usePhraseHighlighter=true&hl.highlightMultiTerm=true&hl.snippets=100&hl.fragsize=100&hl.mergeContiguous=false&hl.requireFieldMatch=false&hl.maxAnalyzedChars=-1&sort=timestamp+asc&facet.limit=6000&rows=6000&fl=score

On Thu, Jun 18, 2009 at 2:51 PM, Mark Miller <markrmil...@gmail.com> wrote:

> Nothing off the top of my head ...
>
> I can play around with some of the solrj unit tests a bit later and perhaps
> see if I can dig anything up.
>
> Note:
> if you expect wildcard/prefix/etc queries to highlight, they will not with
> Solr 1.3.
>
> query.set("hl.highlightMultiTerm", *true*);
>
> The above only applies to solr 1.4.
> So if your query is just a wildcard ...
>
> What is your query, by the way?
>
>
>
> --
> - Mark
>
> http://www.lucidimagination.com
>
>
>
> Bruno wrote:
>
>> Couple of things I've forgot to mention:
>>
>> Solr Version: 1.3
>> Enviroment: Websphere
>>
>> On Thu, Jun 18, 2009 at 2:34 PM, Bruno <brun...@gmail.com> wrote:
>>
>>
>>
>>> I've tried with default values and didn't work either.
>>>
>>>
>>> On Thu, Jun 18, 2009 at 2:31 PM, Mark Miller <markrmil...@gmail.com
>>> >wrote:
>>>
>>>
>>>
>>>> Why do you have:
>>>> query.set("hl.maxAnalyzedChars", -1);
>>>>
>>>> Have you tried using the default? Unless -1 is an undoc'd feature, this
>>>> means you wouldnt get anything back! This should normally be a fairly
>>>> hefty
>>>> value and defaults to 51200, according to the wiki.
>>>>
>>>> And why:
>>>> query.set("hl.fragsize", 1);
>>>>
>>>> That means a fragment could only be 1 char - again, I'd try the default
>>>> (take out the param), and adjust from there.
>>>> (wiki says the default is 100).
>>>>
>>>> Let us know how it goes.
>>>>
>>>> --
>>>> - Mark
>>>>
>>>> http://www.lucidimagination.com
>>>>
>>>>
>>>>
>>>> Bruno wrote:
>>>>
>>>>
>>>>
>>>>>  Hi guys.
>>>>>  I new at using highlighting, so probably I'm making some stupid
>>>>> mistake,
>>>>> however I'm not founding anything wrong.
>>>>>  I use highlighting from a query withing a EmbeddedSolrServer, and
>>>>> within
>>>>> the query I've set parameters necessary for enabling highlighting.
>>>>> Attached,
>>>>> follows my schema and solrconfig.xml , and down below follows the Java
>>>>> code.
>>>>> Content from the SolrDocumentList is not highlighted.
>>>>>
>>>>> EmbeddedSolrServer server = SolrServerManager./getServerEv/();
>>>>> String queryString = filter;
>>>>> SolrQuery query =
>>>>>
>>>>> *new* SolrQuery();
>>>>>
>>>>> query.setQuery(queryString);
>>>>> query.setHighlight(*true*);
>>>>> query.addHighlightField(/LOG_FIELD/);
>>>>> query.setHighlightSimplePost("<i>");
>>>>> query.setHighlightSimplePre("</i>");
>>>>> query.set("hl.usePhraseHighlighter", *true*);
>>>>> query.set("hl.highlightMultiTerm", *true*);
>>>>> query.set("hl.snippets", 100);
>>>>> query.set("hl.fragsize", 1);
>>>>> query.set("hl.mergeContiguous", *false*);
>>>>> query.set("hl.requireFieldMatch", *false*);
>>>>> query.set("hl.maxAnalyzedChars", -1);
>>>>>
>>>>> query.addSortField(/DATE_FIELD/, SolrQuery.ORDER./asc/);
>>>>>
>>>>> query.setFacetLimit(LogUtilProperties./getInstance/().getProperty(LogUtilProperties./LOGEVENT_SEARCH_RESULT_SIZE/,
>>>>> 10000));
>>>>>
>>>>> query.setRows(LogUtilProperties./getInstance/().getProperty(LogUtilProperties./LOGEVENT_SEARCH_RESULT_SIZE/,
>>>>> 10000));
>>>>> query.setIncludeScore(*true*);
>>>>> QueryResponse rsp = server.query(query);
>>>>> SolrDocumentList docs = rsp.getResults();
>>>>>
>>>>> --
>>>>> Bruno Morelli Vargas      Mail: brun...@gmail.com <mailto:
>>>>> brun...@gmail.com>
>>>>> Msn: brun...@hotmail.com <mailto:brun...@hotmail.com>
>>>>> Icq: 165055101
>>>>> Skype: morellibmv
>>>>>
>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>>
>>> --
>>> Bruno Morelli Vargas
>>> Mail: brun...@gmail.com
>>> Msn: brun...@hotmail.com
>>> Icq: 165055101
>>> Skype: morellibmv
>>>
>>>
>>>
>>>
>>
>>
>>
>>
>
>
>
>


-- 
Bruno Morelli Vargas
Mail: brun...@gmail.com
Msn: brun...@hotmail.com
Icq: 165055101
Skype: morellibmv

Reply via email to