Key word query in storage service

0 votes

I am trying to run a query against a collection that contains documents like this

{"Where":{"propertyName":"Where","propertyType":"Text","propertyValue":"where is the blackout?"},"DocumentType":{"propertyName":"DocumentType","propertyType":"Text","propertyValue":"DocumentTemplate"},"HomesAffected":{"propertyName":"HomesAffected","propertyType":"Text","propertyValue":"Number of homes affected"},"ComplaintType":{"propertyName":"ComplaintType","propertyType":"Text","propertyValue":"Blackout"},"Since":{"propertyName":"Since","propertyType":"Text","propertyValue":"since how many days"}}

I am t rying to get documents containing a keyword - say "blackout".

I have tried to do this programatically or through the dashboard with no luck - it always returns no document is in the colection. How can I do a keyword search in the jsonDocument?

Can I for instance use a query like 

builtQuery = QueryBuilder.build("propertyValue", "Blackout", Operator.LIKE) which is what i use and get no document found or should I use something else?

asked Mar 7, 2015 in App42 Cloud API-BaaS by jamesagada (20 points)
it seems the query will work if we have the key/value pair as "key":"value". And "value" is just a fixed string and not another json fragment. Still need to figure out how to do my query.

1 Answer

0 votes

Hello James,

You can easily find your document by applying the below query and let me know if it helps:

builtQuery = QueryBuilder.build("Where.propertyValue""blackout", Operator.LIKE);

Thanks,

Himanshu Sharma

 

answered Mar 9, 2015 by hs00105 (2,005 points)
Tried on the dashboard but it did not work.
Please make sure your spells are correct while you are searching your document from the dashboard as well as from API . Because the search is case sensitive, so please make sure your query is correct. If you still face an issue then please share the respective screenshots with us. It will help us to replicate the same at our end.

Thanks,
Himanshu Sharma
Download Widgets
Welcome to ShepHertz Product line forum, where you can ask questions and receive answers from the community. You can also reach out to us on support@shephertz.com
...