Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我一直试图弄清楚这一点。如果我创建一个没有指令的架构:
<copyField source="*" dest="text" />
我似乎什么都拉不起来。但是当我添加那个指令时,事情神奇地出现了。我正在尝试使用 ?defType=dismax 进行查询,但这似乎没有帮助。
我错过了什么吗?我的架构中需要一些特殊的东西吗?我正在索引我需要搜索的所有字段。
想法?
谢谢!
如果您使用 defType=lucene,您需要在搜索查询之前指定字段,如下所示:
q=title:test
如果您不指定字段 solr 将使用solrconfig.xml. 该字段是text默认的。由于所有字段都被复制到text搜索中效果很好。如果您决定使用dismax查询结构更改。您需要这样输入搜索词:
solrconfig.xml
text
dismax
q=test
并指定要在其他参数中搜索的字段,例如:
<str name="qf">field1 field2</str>
您要搜索术语的位置和字段field1。field2
field1
field2