我是SOLR的新手,正在尝试理解动态字段,
假设我有以下模式,
如果文档-1包含id = 1,author = "Tom“,title = "Python",text = "Book",first_name_string =”Tom“和last_name_string = "Dan”
如果document-2包含id = 2,author = "Brain“,title = "Java”,text = "Java“
这些值将如何存储?
我的第一个document-1和document-2是否将存储为seen above..What将是document-2的值first_name_string和last_name_string?
如果我对这两个文档进行查询,SOLR结果会是什么样子。
<?xml verson='1.0' ?>
<schema name='simple' version='1.1'>
<types>
<fieldtype name='string' class='solr.StrField' />
<fieldType name='long' class='solr.TrieLongField' />
</types>
<fields>
<field name='id' type='long' required='true' />
<field name='author' type='string' multiValued='true' />
<field name='title' type='string' />
<field name='text' type='string' />
<dynamicField name='*_string' type='string'
multiValued='true' indexed='true' stored='true' />
<copyField source='*' dest='fullText' />
<field name='fullText' type='string'multiValued='true' indexed='true' />
</fields>
<uniqueKey>id</uniqueKey>
<defaultSearchField>fullText</defaultSearchField>
<solrQueryParser defaultOperator='OR' />
</schema>发布于 2014-04-12 10:10:12
如果您没有为任何字段提供数据,.solr将跳过您希望让所有docs.please中所有字段都为您的模式中的字段指定默认值的doc.if的那些字段。
https://stackoverflow.com/questions/22977116
复制相似问题