lucene search is finding too much!
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-24-2008 10:03 PM
In a webscript I am doing a search …
var nodes = search.luceneSearch( path + " AND " + cddocument + " AND " + expression );
where the expression is
PATH:"/app:company_home/sys:Cabinets//." AND @cm\:name:"logo.jpg"
But not only does this return the document with
cm:name=logo.jpg
But it also returns documents
cm:name=eclipse_logo.jpg
cm:name=spring_logo.jpg
In other words, my search, which I intended as a 'is' is acting like a 'contains'. It is also case insensitive.
The Advanced Search in the GUI behaves exactly the same, finding more than I bargained for.
I am no lucene expert, from from the doc I read, seems something ain't right. Can someone shed some light?
var nodes = search.luceneSearch( path + " AND " + cddocument + " AND " + expression );
where the expression is
PATH:"/app:company_home/sys:Cabinets//." AND @cm\:name:"logo.jpg"
But not only does this return the document with
cm:name=logo.jpg
But it also returns documents
cm:name=eclipse_logo.jpg
cm:name=spring_logo.jpg
In other words, my search, which I intended as a 'is' is acting like a 'contains'. It is also case insensitive.
The Advanced Search in the GUI behaves exactly the same, finding more than I bargained for.
I am no lucene expert, from from the doc I read, seems something ain't right. Can someone shed some light?
Labels:
- Labels:
-
Archive
1 REPLY 1

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-07-2008 11:41 AM
Hi
This is correct. The attribute cm:name is tokenised for full text search.
If you want to treat the filename as an identifier you need to use the QNAME field.
Cheers
Andy
This is correct. The attribute cm:name is tokenised for full text search.
If you want to treat the filename as an identifier you need to use the QNAME field.
Cheers
Andy
