SOLR数据导入处理程序跳过或忽略请求(SOLR data import handler skips or ignores request)
我使用的是SOLR 6.0.0,我使用数据导入处理程序来处理从MySQL到SOLR的索引。
我在我的db-data-config.xml文件中有下面的查询
<entity name="user" query="SELECT ID, A, B, C FROM `USER` U WHERE U.ID = '${dataimporter.request.id}' OR '' = '${dataimporter.request.id}'"> <field column="A" name="A" .... ....... </entity>
基本上,如果我通过ID,它只会索引该ID,否则会索引整个表。
现在问题是,
我有一个频繁的插入更新。
在第一次插入后,我发送请求到单个id / doc / row的索引,在几毫秒之后记录被更新,因此我再次发送索引相同id的请求。 现在看起来SOLR跳过第二个请求,因为我可以看到两个请求都去了,但更新后的数据不存在于SOLR中。
这也发生在非独特的项目上(不是相同的ID)。 我同时请求两个或三个数据导入,solr跳过/忽略第二个请求。
我用http方法请求它,发送下面的查询,
http://localhost:8983/solr/user/dataimport?command=full-import&verbose=false&clean=false&commit=true&optimize=false&core=user&id=1
I am using SOLR 6.0.0 and I use data import handler to handle indexing from MySQL to SOLR.
I have below query in my db-data-config.xml file
<entity name="user" query="SELECT ID, A, B, C FROM `USER` U WHERE U.ID = '${dataimporter.request.id}' OR '' = '${dataimporter.request.id}'"> <field column="A" name="A" .... ....... </entity>
Basically if i pass the id, it will index only that ID, otherwise it will index whole table.
Now Issue is,
I have a frequent insert update.
After first insert I send request to index of single id/doc/row, just after few millisecond the record gets updated so I send again the request to index same id. Now it seems SOLR skips the second request as I can see that both request went but the updated data is not present in the SOLR.
This happens with non unique items too (not same id). I request two or three data import at the same time and solr skips/ignores second request.
I request it with http method, sending following query,
http://localhost:8983/solr/user/dataimport?command=full-import&verbose=false&clean=false&commit=true&optimize=false&core=user&id=1
原文:https://stackoverflow.com/questions/43784155
最满意答案
firstAvailable[0].value = descriptionMenu.options[descriptionMenu.selectedIndex].text;
firstAvailable
是NodeList[1]
一个数组,因此您需要指定获取NodeElement
的索引。只是一个建议。
function detectAvailable() { var descriptionInputs = document.querySelectorAll("input[name^='descriptionInput']"); for (var i = 0; i < descriptionInputs.length; i++) { if (descriptionInputs[i].value == '') { return descriptionInputs[i]; } } }
和
addButton.onclick = function () { var firstAvailable = detectAvailable(); firstAvailable.value = descriptionMenu.options[descriptionMenu.selectedIndex].text; }
firstAvailable[0].value = descriptionMenu.options[descriptionMenu.selectedIndex].text;
firstAvailable
isNodeList[1]
an array so you need to specify the index to getNodeElement
.Just a suggestion.
function detectAvailable() { var descriptionInputs = document.querySelectorAll("input[name^='descriptionInput']"); for (var i = 0; i < descriptionInputs.length; i++) { if (descriptionInputs[i].value == '') { return descriptionInputs[i]; } } }
And
addButton.onclick = function () { var firstAvailable = detectAvailable(); firstAvailable.value = descriptionMenu.options[descriptionMenu.selectedIndex].text; }
相关问答
更多-
替换输入标记的onchange值并添加用于显示输出的范围,如下所示 像这样添加一个javascript函数 function displayValue(event) { document.getElementById("url").innerHTML=event. ...
-
为了限制变量值的范围,你可以通过if-else语句或者三元操作来传递它,它们就像你的值的过滤器一样。 例如 if (yearsOpen <= 3) ? (if (yearsOpen < 1) ? (yearsOpen = 1) : (yearsOpen = yearsOpen)) : (yearsOpen = 3); if (n <= 3) ? (if (n < 1) ? (n = 1) : (n = n)) : (n = 3);更小的语句if (n <= 3) ? (if (n < 1) ? (n = ...
-
尝试这个: document.getElementById("poo").innerHTML = "Jonny" I've been able to figure out a way to resolve it and i guessed posting it here might help. I checked the source code (ctrl + u) of the page where the contact form tag is located and I noticed that e ...
-
为什么我的表单输入值的更改没有出现在Javascript中?(Why is the change to my form input value not appearing in Javascript?)[2023-12-05]
firstAvailable[0].value = descriptionMenu.options[descriptionMenu.selectedIndex].text; firstAvailable是NodeList[1]一个数组,因此您需要指定获取NodeElement的索引。 只是一个建议。 function detectAvailable() { var descriptionInputs = document.querySelectorAll("input[name^='descrip ... -
您尝试使用setAttribute是件好事,因为它是一个重要的方法,但问题是您不想在这种情况下修改value 属性 ,这是DOM的一部分,但是您想要修改元素的value 属性 。 email.value = 'Insert a correct email'; http://jsfiddle.net/XJZwm/ It's good that you were trying to use setAttribute at all because it's an important method, ...
-
尝试下面的内容 Try the folloiwng您将查询字符串添加到url,如record.asp?name=value&name=value 另外我想你想从表单中获取值: document.forms.
. .value 请查看使用值代替的asp代码的完整示例