FireBoard
Welcome, Guest
Please Login or Register.    Lost Password?
Question about fulltext search (1 viewing) (1) Guest
Go to bottom Post Reply Favoured: 0
TOPIC: Question about fulltext search
#902
Field888 (User)
Fresh Boarder
Posts: 3
graphgraph
User Offline Click here to see the profile of this user
Question about fulltext search 3 Months, 3 Weeks ago Karma: 0  
Hi
I learn that the search statements in OpenKM are organized like this:
//element(*,okm:document)[jcr:contains(.,'term1') and jcr:contains(.,'term2')]
but how do you search for content that does not include a term? Is it using jcr:contains(.,'-term1'? I tests this statment but doesn't work.

I appreciate any help
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#906
pavila (Admin)
Admin
Posts: 304
graph
User Offline Click here to see the profile of this user
Gender: Male OpenKM
Re:Question about fulltext search 3 Months, 3 Weeks ago Karma: 7  
OpenKM uses Lucene for queries. See Lucene Query Syntax to learn more on its capabilities. And your query should be re-written this way:
Code:

//element(*,okm:document)[jcr:contains(okm:content,'term1') and jcr:contains(okm:content,'term2')]
 
Report to moderator   Logged Logged  
 
Be open, my friend!
  The administrator has disabled public write access.
#907
pavila (Admin)
Admin
Posts: 304
graph
User Offline Click here to see the profile of this user
Gender: Male OpenKM
Re:Question about fulltext search 3 Months, 3 Weeks ago Karma: 7  
See this query:

Code:

/jcr:root/okm:root//element(*,okm:document)[jcr:contains(okm:content,'coche -casa')] order by @jcr:score descending
This will search for documents which contains "coche" and not "casa", and will order the results.
 
Report to moderator   Logged Logged  
 
Be open, my friend!
  The administrator has disabled public write access.
#908
Field888 (User)
Fresh Boarder
Posts: 3
graphgraph
User Offline Click here to see the profile of this user
Re:Question about fulltext search 3 Months, 3 Weeks ago Karma: 0  
Thanks for your help,
I organized the querry like this:
/jcr:root/okm:root//element(*,okm:document)[jcr:contains(okm:content,'* - casa')] order by @jcrcore descending

And this works well.
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
Go to top Post Reply
Powered by FireBoardget the latest posts directly to your desktop