How to use SOLR copyField directive

后端 未结 3 1592
暖寄归人
暖寄归人 2020-12-08 10:50

I have a rather simple SOLR structure, that hold three different fields:

id, text and tags

in the schema.xml I set the following



        
3条回答
  •  醉梦人生
    2020-12-08 11:17

    I haven't tried using the copyField to append additional text to an existing field. I suppose Solr could concatenate it, or add it as a second value.

    But here's a couple ideas to try:

    1. Experiment with a document where the text field is blank, perhaps not even mentioned as a under the structure. Does it seem to make a difference when tags make it into the main text whether text starts out as totally blank or not?

    2. Declare a second field, call it text2. And then ALSO copy tags into text2 via a second copyField directive. This text2 field won't have anything else in it, presumably not even mentioned in your fields, so for sure it should get the content.

    In both cases you'd check results with the schema browser, as before. I'd be very curious to hear how you find out!

提交回复
热议问题