The current xql script won't work for these fields... Different kinds of search are needed. (one document listing for the first and no search at all at second). Do you want a special scripts for each autocomplete?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Any example how to use it?
web/autocomplete/json-vxoware.html and web/autocomplete/autocomplete.jsp
ok
The current xql script won't work for these fields... Different kinds of search are needed. (one document listing for the first and no search at all at second). Do you want a special scripts for each autocomplete?
> Do you want a special scripts for each autocomplete?
Yes. Your Objects being higher priority.
Could you provide more information what data structure do we need from the xql script?
For tags, 'ab' should return a JSON structure of the form ['absent','abcde','abq'].
For Objects, the search should be on the Title and Description element (if one exists). What should be returned is
{[ObjId:OBJECTID,Title:TITLE,Description:DESCRIPTION],[ObjId:OBJECTID,Title:TITLE,Description:DESCRIPTION],...}
I suppose that we would want the capability of doing an a search on all elements of the schema as well, but that should be off by default.
For reference: http://www.xmltoday.org/content/turning-exist-db-json-server-part-i
Would this http://ec2-174-129-50-195.compute-1.amazonaws.com:8088/exist/rest/db/virbo/scripts/autocompleteObjects.xql?root=/db/virbo&user=CC7796C3-796F-8D39-F315-8C4803F0E1CA work?
Yes.
Could you help with parsing the data in JavaScript? Or point to where it should be done?
Yes, for now just have your code output JSON and I can work on the rest later.
Ok!
Link for tags: http://ec2-174-129-50-195.compute-1.amazonaws.com:8088/exist/rest/db/virbo/scripts/autocompleteTags.xql?root=/db/virbo
Don't forget about "Your Objects"
I posted the link for objects alerady
http://ec2-174-129-50-195.compute-1.amazonaws.com:8088/exist/rest/db/virbo/scripts/autocompleteObjects.xql?root=/db/virbo&user=CC7796C3-796F-8D39-F315-8C4803F0E1CA