cancel
Showing results for 
Search instead for 
Did you mean: 

Search strings

drbaz
Champ in-the-making
Champ in-the-making
From a java app, I want to run a search to find all documents in a particular category.

if the category = "MyCat"

what should be the search string, myQuery, to pass lucene via the method

Query query = new Query(QueryLanguageEnum.lucene, myQuery); 


Thanks
1 REPLY 1

andy
Champ on-the-rise
Champ on-the-rise
Hi

I think you want to restrict by type and by category:

Somthing like:

"+TYPE:\"{namespace}typename\" +PATH:\"/test:Region//member\""

TYPE does not support prefixes yet - Just get the QName of the type to buid the TYPE:   bit of the query.

This will find things by type and all members of the test:Region classification

Categorisation is very similar to putting things in folders so the PATH field supports this.

The path is


/NameSpacePrefixOfTheClassification:LocalNamedOfTheClassification/categorynamespace:categorylocalname/

So …


PATH:\"/cm:generalclassifiable/cm:MyCatContainer/cm:MyCat//members\"

Will find all the members of your catageory and any subcategories.
(I am not sure of the cm prefix)

Regards

Andy