lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Eugeny Balakhonov" <c0f...@gmail.com>
Subject Solr schema: Sentence to refine copyField command
Date Wed, 10 Aug 2011 21:27:03 GMT
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


Mime
View raw message