标签: full-text-search

重新索引时太阳黑子错误 400 错误请求

我正在使用 sunspot/solr 为我的 Rails 应用程序构建全文搜索。前几次我能够运行bundle exec rake sunspot:reindex,但后来收到此错误:

RSolr::Error::Http: RSolr::Error::Http - 400 Bad Request
Error: {'responseHeader'=>{'status'=>400,'QTime'=>1},'error'=>{'msg'=>'Exception writing document id Product 1 to the index; possible analysis error.','code'=>400}}

URI: http://localhost:8982/solr/development/update?wt=ruby
Request Headers: {"Content-Type"=>"text/xml"}
Request Data: "<?xml version=\"1.0\" encoding=\"UTF-8\"?><add><doc><field name=\"id\">Product 1</field><field name=\"type\">Product</field><field name=\"type\">ActiveRecord::Base</field><field name=\"class_name\">Product</field><field boost=\"5\" name=\"code_textp\">Macbook pro 123</field><field name=\"code_textp\">&lt;p&gt;hahahahahhhahahahahhhahahahahhhahahahahhhahahahahhhahahahahhhahahahahhhahahahahh&lt;/p&gt;</field></doc><doc><field name=\"id\">Product 2</field><field name=\"type\">Product</field><field name=\"type\">ActiveRecord::Base</field><field name=\"class_name\">Product</field><field boost=\"5\" name=\"code_textp\">test product</field><field name=\"code_textp\">&lt;p&gt;dfdsfsdfdsfsfsdfsdfdsf&lt;/p&gt;</field></doc><doc><field name=\"id\">Product 3</field><field name=\"type\">Product</field><field name=\"type\">ActiveRecord::Base</field><field name=\"class_name\">Product</field><field boost=\"5\" name=\"code_textp\">Macbook used</field><field name=\"code_textp\">&lt;p&gt;it is refurebishedit is refurebishedit is refurebishedit is refurebishedit is refurebishedit is refurebishedit is refurebished&lt;/p&gt;</field></doc></add>"

Backtrace: …
Run Code Online (Sandbox Code Playgroud)

solr full-text-search ruby-on-rails sunspot

0
推荐指数
1
解决办法
1158
查看次数

Hibernate Search ,更改默认分析器

我想像默认一样使用自定义分析器。在 Hibernate 搜索的文档上在线搜索,我发现可以在 Hibernate 配置中更改它。特别是“hibernate.search.analyzer”属性。然后我做了这个属性

<property name="hibernate.search.analyzer">Class of Analyzer </property>
Run Code Online (Sandbox Code Playgroud)

我的问题是:如何创建分析器的类以在属性中传递它?特别是我想使用“EdgeNGram”,我试图通过 EngedNgram 的 tokenizer 工厂,但它不起作用。

<property name="hibernate.search.analyzer">EdgeNGramTokenizerFactory.class</property>
Run Code Online (Sandbox Code Playgroud)

您能否向我展示我可以在该属性中通过的课程的示例?谢谢

full-text-search hibernate-search

0
推荐指数
1
解决办法
1500
查看次数

SQL Server 全文搜索未返回预期结果

我安装了 SQL Server 全文搜索,创建了目录和索引。我确信数据库中有正确的记录,但 FTS 函数不返回任何结果。

例如:

select * from tablename where contains(title, 'baycan');
select * from tablename where contains(title, '"*baycan*"')
Run Code Online (Sandbox Code Playgroud)

这是目录和索引图像:

在此输入图像描述

sql-server full-text-search

0
推荐指数
1
解决办法
1164
查看次数

Meilisearch - searchableAttributes、filterableAttributes、faceting之间的区别和关系是什么

searchableAttributes, filterableAttributes, faceting. 我读过这些文件,但有点困惑。

请提供一些有关以下方面的见解:

  • 他们的差异。
  • 他们的关系。

full-text-search meilisearch

0
推荐指数
1
解决办法
464
查看次数