Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Content Management (Extended ECM)
API, SDK, REST and Web Services
Query failed on ApplyQuery.java
Jimmy_Wu_(jwu@nrx.com_-_(deleted))
I download ApplyQuery.java from knowledge center and modified to connect to my livelink server. Under enterprise workspace in livelink server NRX is the root folder contains subfolders and check-in files. every file has four standard attributes: Manufacturer, model, serialNo and Equipment type. I would like to run a qurey to find the files which attribute Manufacturer contains 'AB', for example.NRX\public\a\A.pdf attribute Manufacturer='ABC Inc' NRX\public\b\B.pdf attribute Manufacturer='AB Inc'NRX\public\c\C.pdf attribute Manufacturer='NRX Corp'The query should return the volume Id and object Id of file A.pdf and B.pdf. I executed AppyQuery.java and the application only return the following message: Apply query failedStatus Code: -2147481632Api Error: Error Message: Status Message: You have either not specified any search criterion at all, or one of your Livelink Query Language statements is incorrect. Edit the query by clicking an option in at least one list and/or correcting the statements that appear in the fields.Please take a look at the attached file.Appreciate your help.Jimmy
Find more posts tagged with
Comments
Appu_Nair
your query amonst many things is aying this give me object that have a category defid of 7019 and the 10 the attribute and its value is 12345.So I would check whether or not you have correctly put the attributes.You have to put ?func=attributes.dump and in the ensuing screen look for what Manfacturer's index iswhere = "(Attr_7019_10 : \"12345\")";The message is not indicative of anything major failure,you made it to the livelink search piece but your where could not locate that by that criterionI hope that helps
Jimmy_Wu_(jwu@nrx.com_-_(deleted))
Thank you for the reply.I found the attribute name from Engterprise Seach Manger->region as below:Attr_7019_10 NRXCategory:manufacturer There is a file with the attribute value '12345' under Enterprise workspace\nrx\public\live2\. But my search application just couldn't find it. Do I need to specify root folder or any path info in my search criterion? Is my where clasue where = "(Attr_7019_10 : \"12345\")"; correct?Can I use wildcard search like where = "(Attr_7019_10 : \"123*\")"; ?
Appu_Nair
now the only way to test this would be to use the livelink search gui and using its advanced search type in the LQL term you developed.If that finds it then lapi is going wrong.If that again is not found thru search what you might do is change something on that file and wait five minutes and again search(jut forcing a re-index)If everything fails open a support ticket.It could also mean thatone of those radio buttons that you have in the search regions could be the culprit.I don't remmeber off the top of my haed what those are.
Appu_Nair
I found a sample that I was using to test this before and I see that I add that cat_att into the select list something likevSelectList.add("Attr_152278_35");I don't know whether that is needed or not but you can certainly try this as well.Anyway the file that you posted looks remarkably similar to this one so it is just a hunch:)
Jimmy_Wu_(jwu@nrx.com_-_(deleted))
Thanks Appu, your code works! Now I can get search result. Do you know how to use wildcard? like use (Attr_7019_10 : \"J*\") to fetch 'Jimmy Inc'?'