Commit ac52056a authored by Aleksandra Tsys's avatar Aleksandra Tsys
Browse files

changed payload field to id

parent b073ba13
......@@ -709,9 +709,21 @@ public class ContextAnalyzingSuggester extends Lookup implements Accountable {
protected boolean acceptResult(IntsRef input, PairOutputs.Pair<Long, BytesRef> output) {
LookupResult result = getLookupResult(output.output1, output.output2, spare);
BytesRef res_context = result.payload;
if (contexts == null || !(contexts.contains(res_context))) {
return false;
System.out.println("res_context1 = " + res_context);
if (contexts == null) {
return false;
}
for (BytesRef context : contexts) {
System.out.println("context1 = " + context);
}
if (!(contexts.contains(res_context))) {
return false;
}
System.out.println("contains 1");
return true;
}
};
......@@ -769,15 +781,18 @@ public class ContextAnalyzingSuggester extends Lookup implements Accountable {
protected boolean acceptResult(IntsRef input, Pair<Long,BytesRef> output) {
LookupResult result = getLookupResult(output.output1, output.output2, spare);
BytesRef res_context = result.payload;
System.out.println("res_context2 = " + res_context);
System.out.println("res_context = " + res_context);
if (contexts == null) {
return false;
}
for (BytesRef context : contexts) {
System.out.println("context = " + context);
System.out.println("context2 = " + context);
}
if (contexts == null || !(contexts.contains(res_context))) {
return false;
if (!(contexts.contains(res_context))) {
return false;
}
System.out.println("contains 2");
if (seen.contains(output.output2)) {
......
......@@ -468,7 +468,7 @@
<copyField source="state" dest="tags"/>
<copyField source="categories" dest="tags"/>
<copyField source="stars" dest="tags"/>
<field name="name" type="text_general" stored="true"/>
<field name="name" type="string" stored="true" indexed="true"/>
<field name="review_count" type="plongs"/>
<field name="reviews" type="text_general"/>
<field name="stars" type="pdoubles"/>
......
......@@ -331,7 +331,7 @@
<str name="field">name</str>
<str name="suggestAnalyzerFieldType">string</str>
<!--<str name="suggestAnalyzerFieldType">textSuggest</str>-->
<str name="payloadField">name</str>
<str name="payloadField">id</str>
<str name="buildOnStartup">false</str>
<str name="buildOnCommit">false</str>
</lst>
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment