lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Erik Hatcher <erik.hatc...@gmail.com>
Subject Re: Solr schema: Sentence to refine copyField command
Date Wed, 10 Aug 2011 22:37:01 GMT
Eugeny -

Rather than add another feature like this, consider using the hl.fl parameter (see http://wiki.apache.org/solr/HighlightingParameters
for details) for specifying the other fields you want highlighted.  And also consider not
storing the TEXT field as you don't really need it given you will be storing FIELD1...FIELD3.

	Erik

On Aug 10, 2011, at 17:27 , Eugeny Balakhonov wrote:

> Hello, all!
>  
> According to documentation Solr one field for search by default is possible only:
>  
> <defaultSearchField>TEXT</defaultSearchField>
>  
> This field can be filled with following commands:
>  
> <copyField source="FIELD1" dest="TEXT"/>
> <copyField source="FIELD2" dest="TEXT"/>
> <copyField source="FIELD3" dest="TEXT"/>
>  
> In this case the “TEXT” field is purely technical and isn't intended for an output
to the user.
>  
> By search with q=foo we will receive result as is resulted in a following example::
>  
> ………….
> <lst name="highlighting">
>     <lst name="154203.6194667...">
>         <arr name="TEXT">
>             <str>Something <em>foo</em></str>
>         </arr>
>     </lst>
>     <lst name="154203.6711988...">
>         <arr name="TEXT">
>             <str> Something <em>foo</em></str>
>         </arr>
>     </lst>
> </lst>
> …………..
>  
> But in this case we have no information where really the found string "Something foo"
is stored in the source document.
> I suggest to expand of copyField command for storing a name of source field:
>  
> In the Solr schema:
>  
> <copyField source="ENT_LIST_ENT_GCP" dest="TEXT" saveSourceFieldName=”true” />
>  
> In the search result:
>  
> ………….
> <arr name="TEXT">
>     <str source="FIELD1">Something foo</str>
>     <str source="FIELD2">foo foo</str>
>     <str source="FIELD3">123 123 123</str>
> </arr>
> ………….
> <lst name="highlighting">
>     <lst name="154203.6194667...">
>         <arr name="TEXT">
>             <str source="FIELD1">Something <em>foo</em></str>
>         </arr>
>     </lst>
>     <lst name="154203.6711988...">
>         <arr name="TEXT">
>             <str source="FIELD1"> Something <em>foo</em></str>
>         </arr>
>     </lst>
> </lst>
> …………..
>  
> I think that this is very useful feature. There can be someone from developers will become
interested in its implementation?
>  
> Best regards,
> Eugeny


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Mime
View raw message