solr comiit 参数的默认值是多少?
What is the default value of solr comiit params?
在另一个 SO 问题上,我要求澄清我对不同类型的 solr 提交的理解。这是话题link
现在,基本上我想知道当我通过任何 solr POST 请求传递 commit=true
或 commit=false
时,solr 下面会发生什么。
commit=true
curl -X POST -H 'Content-Type: application/json' 'http://localhost:8983/solr/keywords/update/json/docs?commit=true' --data-binary '{ "id": "550148", "keyword": "astle city", "formatted_address": "Auckland, New Zealand", "country_code": "NZ", "region": "Auckland", "place": "Auckland", "lat": "-36.84846", "lng": "174.763332", "update_date": "2015-10-0500: 49: 35", "index": "0", "north": "NULL", "south": "NULL", "east": "NULL", "west": "NULL" }'
commit=false
curl -X POST -H 'Content-Type: application/json' 'http://localhost:8983/solr/keywords/update/json/docs?commit=false' --data-binary '{ "id": "550148", "keyword": "astle city", "formatted_address": "Auckland, New Zealand", "country_code": "NZ", "region": "Auckland", "place": "Auckland", "lat": "-36.84846", "lng": "174.763332", "update_date": "2015-10-0500: 49: 35", "index": "0", "north": "NULL", "south": "NULL", "east": "NULL", "west": "NULL" }'
What is the default value of commit params when I don't set it?
简单来说,commit是指应用到更新了Documents的索引数据。
如果commit=false,只记录在tlog上,不能被搜索到。
但是 commit=true,可以使用新的搜索器搜索更新的文档。 (特别更新openSearcher=false,也搜索不到。)
在之前的回答中有提到,详细看一下这个bit[3]。
如果您传递 "commit" 参数,则您要求硬提交。
如果不这样做,则不会发生任何提交。
在打开搜索器之前,您无法搜索已编入索引的文档。
告诉 Solr 打开搜索器的方法是使用软提交或硬提交 (open searcher = true)。
在您提交之前,您无法搜索这些文档,并且可能您甚至不会将它们刷新到您的 Lucene 目录(这也取决于您的 RAMBuffer,但这是另一回事)
在另一个 SO 问题上,我要求澄清我对不同类型的 solr 提交的理解。这是话题link
现在,基本上我想知道当我通过任何 solr POST 请求传递 commit=true
或 commit=false
时,solr 下面会发生什么。
commit=true
curl -X POST -H 'Content-Type: application/json' 'http://localhost:8983/solr/keywords/update/json/docs?commit=true' --data-binary '{ "id": "550148", "keyword": "astle city", "formatted_address": "Auckland, New Zealand", "country_code": "NZ", "region": "Auckland", "place": "Auckland", "lat": "-36.84846", "lng": "174.763332", "update_date": "2015-10-0500: 49: 35", "index": "0", "north": "NULL", "south": "NULL", "east": "NULL", "west": "NULL" }'
commit=false
curl -X POST -H 'Content-Type: application/json' 'http://localhost:8983/solr/keywords/update/json/docs?commit=false' --data-binary '{ "id": "550148", "keyword": "astle city", "formatted_address": "Auckland, New Zealand", "country_code": "NZ", "region": "Auckland", "place": "Auckland", "lat": "-36.84846", "lng": "174.763332", "update_date": "2015-10-0500: 49: 35", "index": "0", "north": "NULL", "south": "NULL", "east": "NULL", "west": "NULL" }'
What is the default value of commit params when I don't set it?
简单来说,commit是指应用到更新了Documents的索引数据。 如果commit=false,只记录在tlog上,不能被搜索到。 但是 commit=true,可以使用新的搜索器搜索更新的文档。 (特别更新openSearcher=false,也搜索不到。)
在之前的回答中有提到,详细看一下这个bit[3]。
如果您传递 "commit" 参数,则您要求硬提交。 如果不这样做,则不会发生任何提交。 在打开搜索器之前,您无法搜索已编入索引的文档。 告诉 Solr 打开搜索器的方法是使用软提交或硬提交 (open searcher = true)。
在您提交之前,您无法搜索这些文档,并且可能您甚至不会将它们刷新到您的 Lucene 目录(这也取决于您的 RAMBuffer,但这是另一回事)