Re: PostingsSolrHighlighter

2013-12-19 Thread jd
> Hi Josip

Hi Liu,

> that's quite weird, to my experience highlight is strict on string field
> which needs a exact match, text fields should be fine.
>
> I copy your schema definition and do a quick test in a new core,
> everything
> is default from the tutorial, and the search component is
> using solr.HighlightComponent .

I think there is a misunderstanding the "normal" solr.HighlightComponent
is working just fine, but with the PostingsSolrHighlighter i get no
results.

> search on searchable_text can highlight text, I copied your search url and
> just change the host part, the input parameters are exactly the same,
>
> result is attached.
>
> Can you upload your complete solrconfig.xml and schema.xml?

Cya Josip



Re: PostingsSolrHighlighter

2013-12-18 Thread Liu Bo
Hi Josip

that's quite weird, to my experience highlight is strict on string field
which needs a exact match, text fields should be fine.

I copy your schema definition and do a quick test in a new core, everything
is default from the tutorial, and the search component is
using solr.HighlightComponent .

search on searchable_text can highlight text, I copied your search url and
just change the host part, the input parameters are exactly the same,

result is attached.

Can you upload your complete solrconfig.xml and schema.xml?


On 18 December 2013 19:02, Josip Delic  wrote:

> Am 18.12.2013 09:55, schrieb Liu Bo:
>
>> hi Josip
>>
>
> hi liu,
>
>
>  for the 1 question we've done similar things: copying search field to a
>> text field. But highlighting is normally on specific fields such as tittle
>> depending on how the search content is displayed to the front end, you can
>> search on text and highlight on the field you wanted by specify hl.fl
>>
>> ref: http://wiki.apache.org/solr/HighlightingParameters#hl.fl
>>
>
> thats exactly what i'm doing in that pastebin:
>
> http://pastebin.com/13Uan0ZF
>
> I'm searing there for 'q=searchable_text:labore' this is present in 'text'
> and in the copyfield 'searchable_text' but it is not highlighted in 'text'
> (hl.fl=text)
>
> The same query is working if set 'q=text:labore' as you can see in
>
> http://pastebin.com/4CP8XKnr
>
> For 2 question i figured out that the PostingsSolrHighlighter "ellipsis"
> is not like i thought for adding "ellipsis" to start or/and end in
> highlighted text. It is instead used to combine multiple snippets together
> if snippets is > 1.
>
> cheers
>
> josip
>
>
>
>>
>> On 17 December 2013 02:29, Josip Delic  wrote:
>>
>>  Hi @all,
>>>
>>> i am playing with the "PostingsSolrHighlighter". I'm running solr 4.6.0
>>> and my configuration is from here:
>>>
>>> https://lucene.apache.org/solr/4_6_0/solr-core/org/
>>> apache/solr/highlight/
>>> PostingsSolrHighlighter.html
>>>
>>> Search query and result (not working):
>>>
>>> http://pastebin.com/13Uan0ZF
>>>
>>> Schema (not complete):
>>>
>>> http://pastebin.com/JGa38UDT
>>>
>>> Search query and result (working):
>>>
>>> http://pastebin.com/4CP8XKnr
>>>
>>> Solr config:
>>>
>>> 
>>>
>>>
>>>
>>> 
>>>
>>> So this is working just fine, but now i have some questions:
>>>
>>> 1.) With the old default highlighter component it was possible to search
>>> in "searchable_text" and to retrive highlighted "text". This is
>>> essential,
>>> because we use copyfield to put almost everything to searchable_text
>>> (title, subtitle, description, ...)
>>>
>>> 2.) I can't get ellipsis working i tried hl.tag.ellipsis=...,
>>> f.text.hl.tag.ellipsis=..., configuring it in RequestHandler noting seems
>>> to work, maxAnalyzedChars is just cutting the sentence?
>>>
>>> Kind Regards
>>>
>>> Josip Delic
>>>
>>>
>>>
>>
>>
>
>


-- 
All the best

Liu Bo
http://localhost:8080/solr/try/select?wt=json&fl=text&%2Cscore=&hl=true&hl.fl=text&q=%28searchable_text%3Alabore%29&rows=10&sort=score+desc&start=0

{
"responseHeader": {
"status": 0,
"QTime": 36,
"params": {
"sort": "score desc",
"fl": "text",
"start": "0",
",score": "",
"q": "(searchable_text:labore)",
"hl.fl": "text",
"wt": "json",
"hl": "true",
"rows": "10"
}
},
"response": {
"numFound": 3,
"start": 0,
"docs": [
{
"text": "Lorem ipsum dolor sit amet, consetetur sadipscing 
elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna 
aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores 
et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum 
dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed 
diam nonumy eirmod tempor invidunt ut labore et dolore magna aliq

Re: PostingsSolrHighlighter

2013-12-18 Thread Josip Delic

Am 18.12.2013 09:55, schrieb Liu Bo:

hi Josip


hi liu,


for the 1 question we've done similar things: copying search field to a
text field. But highlighting is normally on specific fields such as tittle
depending on how the search content is displayed to the front end, you can
search on text and highlight on the field you wanted by specify hl.fl

ref: http://wiki.apache.org/solr/HighlightingParameters#hl.fl


thats exactly what i'm doing in that pastebin:

http://pastebin.com/13Uan0ZF

I'm searing there for 'q=searchable_text:labore' this is present in 
'text' and in the copyfield 'searchable_text' but it is not highlighted 
in 'text' (hl.fl=text)


The same query is working if set 'q=text:labore' as you can see in

http://pastebin.com/4CP8XKnr

For 2 question i figured out that the PostingsSolrHighlighter "ellipsis" 
is not like i thought for adding "ellipsis" to start or/and end in 
highlighted text. It is instead used to combine multiple snippets 
together if snippets is > 1.


cheers

josip




On 17 December 2013 02:29, Josip Delic  wrote:


Hi @all,

i am playing with the "PostingsSolrHighlighter". I'm running solr 4.6.0
and my configuration is from here:

https://lucene.apache.org/solr/4_6_0/solr-core/org/apache/solr/highlight/
PostingsSolrHighlighter.html

Search query and result (not working):

http://pastebin.com/13Uan0ZF

Schema (not complete):

http://pastebin.com/JGa38UDT

Search query and result (working):

http://pastebin.com/4CP8XKnr

Solr config:


   




So this is working just fine, but now i have some questions:

1.) With the old default highlighter component it was possible to search
in "searchable_text" and to retrive highlighted "text". This is essential,
because we use copyfield to put almost everything to searchable_text
(title, subtitle, description, ...)

2.) I can't get ellipsis working i tried hl.tag.ellipsis=...,
f.text.hl.tag.ellipsis=..., configuring it in RequestHandler noting seems
to work, maxAnalyzedChars is just cutting the sentence?

Kind Regards

Josip Delic










smime.p7s
Description: S/MIME Cryptographic Signature


Re: PostingsSolrHighlighter

2013-12-18 Thread Liu Bo
hi Josip

for the 1 question we've done similar things: copying search field to a
text field. But highlighting is normally on specific fields such as tittle
depending on how the search content is displayed to the front end, you can
search on text and highlight on the field you wanted by specify hl.fl

ref: http://wiki.apache.org/solr/HighlightingParameters#hl.fl


On 17 December 2013 02:29, Josip Delic  wrote:

> Hi @all,
>
> i am playing with the "PostingsSolrHighlighter". I'm running solr 4.6.0
> and my configuration is from here:
>
> https://lucene.apache.org/solr/4_6_0/solr-core/org/apache/solr/highlight/
> PostingsSolrHighlighter.html
>
> Search query and result (not working):
>
> http://pastebin.com/13Uan0ZF
>
> Schema (not complete):
>
> http://pastebin.com/JGa38UDT
>
> Search query and result (working):
>
> http://pastebin.com/4CP8XKnr
>
> Solr config:
>
> 
>   
>
>
> 
>
> So this is working just fine, but now i have some questions:
>
> 1.) With the old default highlighter component it was possible to search
> in "searchable_text" and to retrive highlighted "text". This is essential,
> because we use copyfield to put almost everything to searchable_text
> (title, subtitle, description, ...)
>
> 2.) I can't get ellipsis working i tried hl.tag.ellipsis=...,
> f.text.hl.tag.ellipsis=..., configuring it in RequestHandler noting seems
> to work, maxAnalyzedChars is just cutting the sentence?
>
> Kind Regards
>
> Josip Delic
>
>


-- 
All the best

Liu Bo


PostingsSolrHighlighter

2013-12-16 Thread Josip Delic

Hi @all,

i am playing with the "PostingsSolrHighlighter". I'm running solr 4.6.0 
and my configuration is from here:


https://lucene.apache.org/solr/4_6_0/solr-core/org/apache/solr/highlight/PostingsSolrHighlighter.html

Search query and result (not working):

http://pastebin.com/13Uan0ZF

Schema (not complete):

http://pastebin.com/JGa38UDT

Search query and result (working):

http://pastebin.com/4CP8XKnr

Solr config:


  class="org.apache.solr.highlight.PostingsSolrHighlighter"/> 





So this is working just fine, but now i have some questions:

1.) With the old default highlighter component it was possible to search 
in "searchable_text" and to retrive highlighted "text". This is 
essential, because we use copyfield to put almost everything to 
searchable_text (title, subtitle, description, ...)


2.) I can't get ellipsis working i tried hl.tag.ellipsis=..., 
f.text.hl.tag.ellipsis=..., configuring it in RequestHandler noting 
seems to work, maxAnalyzedChars is just cutting the sentence?


Kind Regards

Josip Delic



smime.p7s
Description: S/MIME Cryptographic Signature


Re: PostingsSolrHighlighter not working on Multivalue field

2013-06-23 Thread Floyd Wu
Any idea can help on this?


2013/6/22 Erick Erickson 

> Unfortunately, from here I need to leave it to people who know
> the highlighting code
>
> Erick
>
> On Wed, Jun 19, 2013 at 8:40 PM, Floyd Wu  wrote:
> > Hi Erick,
> >
> > "multivalue" is my typo, thanks for your reminding.
> >
> > There is no log show anything wrong or exception occurred.
> >
> > The field definition as following
> >
> >  > omitNorms="false" termVectors="true" termPositions="true"
> > termOffsets="true" storeOffsetsWithPositions="true"/>
> >
> >  > multiValued="true" termVectors="true" termPositions="true"
> > termOffsets="true" omitNorms="false" storeOffsetsWithPositions="true"/>
> >
> > The PostingSolrHighlighter only do highlight on summary field.
> >
> > When I send a xml file to solr like this
> >
> > 
> > 
> >   
> > 
> >   facebook yahoo plurk twitter social
> > nextworing
> >   facebook yahoo plurk twitter social
> > nextworing
> > 
> >   
> > 
> >
> > As you can see the body_0 will be treated using dynamicField definition.
> >
> > Part of the debug response return of Solr like this
> >
> > 
> >   
> > 
> >   Facebook... Facebook
> > 
> > 
> > 
> > 
> >
> > I'm sure hl.fl contains both summary and body_0.
> > This behavior is different between PostingSolrHighlighter and
> > FastVectorhighlighter.
> >
> > Please kindly help on this.
> > Many thanks.
> >
> > Floyd
> >
> >
> >
> > 2013/6/19 Erick Erickson 
> >
> >> Well, _how_ does it fail? unless it's a type it should be
> >> multiValued (not capital 'V'). This probably isn't the
> >> problem, but just in case.
> >>
> >> Anything in the logs? What is the field definition?
> >> Did you re-index after changing to multiValued?
> >>
> >> Best
> >> Erick
> >>
> >> On Tue, Jun 18, 2013 at 11:01 PM, Floyd Wu  wrote:
> >> > In my test case, it seems this new highlighter not working.
> >> >
> >> > When field set multivalue=true, the stored text in this field can not
> be
> >> > highlighted.
> >> >
> >> > Am I miss something? Or this is current limitation? I have no luck to
> >> find
> >> > any documentations mentioned this.
> >> >
> >> > Floyd
> >>
>


Re: PostingsSolrHighlighter not working on Multivalue field

2013-06-22 Thread Erick Erickson
Unfortunately, from here I need to leave it to people who know
the highlighting code

Erick

On Wed, Jun 19, 2013 at 8:40 PM, Floyd Wu  wrote:
> Hi Erick,
>
> "multivalue" is my typo, thanks for your reminding.
>
> There is no log show anything wrong or exception occurred.
>
> The field definition as following
>
>  omitNorms="false" termVectors="true" termPositions="true"
> termOffsets="true" storeOffsetsWithPositions="true"/>
>
>  multiValued="true" termVectors="true" termPositions="true"
> termOffsets="true" omitNorms="false" storeOffsetsWithPositions="true"/>
>
> The PostingSolrHighlighter only do highlight on summary field.
>
> When I send a xml file to solr like this
>
> 
> 
>   
> 
>   facebook yahoo plurk twitter social
> nextworing
>   facebook yahoo plurk twitter social
> nextworing
> 
>   
> 
>
> As you can see the body_0 will be treated using dynamicField definition.
>
> Part of the debug response return of Solr like this
>
> 
>   
> 
>   Facebook... Facebook
> 
> 
> 
> 
>
> I'm sure hl.fl contains both summary and body_0.
> This behavior is different between PostingSolrHighlighter and
> FastVectorhighlighter.
>
> Please kindly help on this.
> Many thanks.
>
> Floyd
>
>
>
> 2013/6/19 Erick Erickson 
>
>> Well, _how_ does it fail? unless it's a type it should be
>> multiValued (not capital 'V'). This probably isn't the
>> problem, but just in case.
>>
>> Anything in the logs? What is the field definition?
>> Did you re-index after changing to multiValued?
>>
>> Best
>> Erick
>>
>> On Tue, Jun 18, 2013 at 11:01 PM, Floyd Wu  wrote:
>> > In my test case, it seems this new highlighter not working.
>> >
>> > When field set multivalue=true, the stored text in this field can not be
>> > highlighted.
>> >
>> > Am I miss something? Or this is current limitation? I have no luck to
>> find
>> > any documentations mentioned this.
>> >
>> > Floyd
>>


Re: PostingsSolrHighlighter not working on Multivalue field

2013-06-19 Thread Floyd Wu
Hi Erick,

"multivalue" is my typo, thanks for your reminding.

There is no log show anything wrong or exception occurred.

The field definition as following





The PostingSolrHighlighter only do highlight on summary field.

When I send a xml file to solr like this



  

  facebook yahoo plurk twitter social
nextworing
  facebook yahoo plurk twitter social
nextworing

  


As you can see the body_0 will be treated using dynamicField definition.

Part of the debug response return of Solr like this


  

  Facebook... Facebook





I'm sure hl.fl contains both summary and body_0.
This behavior is different between PostingSolrHighlighter and
FastVectorhighlighter.

Please kindly help on this.
Many thanks.

Floyd



2013/6/19 Erick Erickson 

> Well, _how_ does it fail? unless it's a type it should be
> multiValued (not capital 'V'). This probably isn't the
> problem, but just in case.
>
> Anything in the logs? What is the field definition?
> Did you re-index after changing to multiValued?
>
> Best
> Erick
>
> On Tue, Jun 18, 2013 at 11:01 PM, Floyd Wu  wrote:
> > In my test case, it seems this new highlighter not working.
> >
> > When field set multivalue=true, the stored text in this field can not be
> > highlighted.
> >
> > Am I miss something? Or this is current limitation? I have no luck to
> find
> > any documentations mentioned this.
> >
> > Floyd
>


Re: PostingsSolrHighlighter not working on Multivalue field

2013-06-19 Thread Erick Erickson
Well, _how_ does it fail? unless it's a type it should be
multiValued (not capital 'V'). This probably isn't the
problem, but just in case.

Anything in the logs? What is the field definition?
Did you re-index after changing to multiValued?

Best
Erick

On Tue, Jun 18, 2013 at 11:01 PM, Floyd Wu  wrote:
> In my test case, it seems this new highlighter not working.
>
> When field set multivalue=true, the stored text in this field can not be
> highlighted.
>
> Am I miss something? Or this is current limitation? I have no luck to find
> any documentations mentioned this.
>
> Floyd


PostingsSolrHighlighter not working on Multivalue field

2013-06-18 Thread Floyd Wu
In my test case, it seems this new highlighter not working.

When field set multivalue=true, the stored text in this field can not be
highlighted.

Am I miss something? Or this is current limitation? I have no luck to find
any documentations mentioned this.

Floyd