Re-ingest native facets PAZ-934
authorAdam Dickmeiss <adam@indexdata.dk>
Tue, 6 May 2014 10:35:00 +0000 (12:35 +0200)
committerAdam Dickmeiss <adam@indexdata.dk>
Tue, 6 May 2014 12:02:33 +0000 (14:02 +0200)
src/client.c
test/test_facets.urls
test/test_facets_26.res [new file with mode: 0644]
test/test_facets_27.res [new file with mode: 0644]

index fbfc564..f78530c 100644 (file)
@@ -868,6 +868,7 @@ int client_start_search(struct client *cl)
     if (cl->same_search == 1 && rc_prep_connection == 2)
     {
         session_log(se, YLOG_LOG, "client %s resuse result", client_get_id(cl));
+        client_report_facets(cl, cl->resultset);
         return client_reingest(cl);
     }
     else if (!rc_prep_connection)
index 5f087c0..bf2924b 100644 (file)
@@ -23,3 +23,5 @@ test_facets_settings_2.xml http://localhost:9763/search.pz2?session=2&command=se
 http://localhost:9763/search.pz2?session=2&command=search&query=9+and+computer
 10 http://localhost:9763/search.pz2?session=2&command=show&block=1
 http://localhost:9763/search.pz2?session=2&command=termlist&name=xtargets%2Cauthor%2Csubject%2Cdate%2Cmedium
+http://localhost:9763/search.pz2?session=2&command=search&query=9+and+computer
+http://localhost:9763/search.pz2?session=2&command=termlist&name=xtargets%2Cauthor%2Csubject%2Cdate%2Cmedium
diff --git a/test/test_facets_26.res b/test/test_facets_26.res
new file mode 100644 (file)
index 0000000..ab63fe6
--- /dev/null
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<search><status>OK</status></search>
\ No newline at end of file
diff --git a/test/test_facets_27.res b/test/test_facets_27.res
new file mode 100644 (file)
index 0000000..c259c84
--- /dev/null
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<termlist><activeclients>0</activeclients>
+<list name="xtargets">
+<term>
+<id>localhost:9999/db1</id>
+<name>db1</name>
+<frequency>9</frequency>
+<state>Client_Idle</state>
+<diagnostic>0</diagnostic>
+</term>
+</list>
+<list name="author">
+<term><name>author0</name><frequency>100</frequency></term>
+<term><name>author1</name><frequency>90</frequency></term>
+<term><name>author2</name><frequency>80</frequency></term>
+<term><name>author3</name><frequency>70</frequency></term>
+<term><name>author4</name><frequency>60</frequency></term>
+<term><name>author5</name><frequency>50</frequency></term>
+<term><name>author6</name><frequency>40</frequency></term>
+<term><name>author7</name><frequency>30</frequency></term>
+<term><name>author8</name><frequency>20</frequency></term>
+<term><name>author9</name><frequency>10</frequency></term>
+</list>
+<list name="subject">
+<term><name>subject0</name><frequency>100</frequency></term>
+<term><name>subject1</name><frequency>90</frequency></term>
+<term><name>subject2</name><frequency>80</frequency></term>
+<term><name>subject3</name><frequency>70</frequency></term>
+<term><name>subject4</name><frequency>60</frequency></term>
+<term><name>subject5</name><frequency>50</frequency></term>
+<term><name>subject6</name><frequency>40</frequency></term>
+<term><name>subject7</name><frequency>30</frequency></term>
+<term><name>subject8</name><frequency>20</frequency></term>
+<term><name>subject9</name><frequency>10</frequency></term>
+</list>
+<list name="date">
+<term><name>date0</name><frequency>100</frequency></term>
+<term><name>date1</name><frequency>90</frequency></term>
+<term><name>date2</name><frequency>80</frequency></term>
+<term><name>date3</name><frequency>70</frequency></term>
+<term><name>date4</name><frequency>60</frequency></term>
+<term><name>date5</name><frequency>50</frequency></term>
+<term><name>date6</name><frequency>40</frequency></term>
+<term><name>date7</name><frequency>30</frequency></term>
+<term><name>date8</name><frequency>20</frequency></term>
+<term><name>date9</name><frequency>10</frequency></term>
+</list>
+<list name="medium"/>
+</termlist>
\ No newline at end of file