Lucene searching question
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-14-2005 11:19 PM
Given a node's id, how can I get its Lucene-path (i.e., a string that I can use in a Lucene "PATH:x" query)?
I am having trouble with a lucene query which includes TYPE and PATH fields that used to work fine (or at least as I expected it to work 🙂 ) before upgrading from PR6 to v1.0. For example:
works, but the following doesn't:
I thought maybe it was because of the space in "get lost", which I replaced with "_", but it still doesn't work.
I am confused: in bootstrapped data, which properties determine the name of a node as used in a Lucene path query?
I am having trouble with a lucene query which includes TYPE and PATH fields that used to work fine (or at least as I expected it to work 🙂 ) before upgrading from PR6 to v1.0. For example:
+TYPE:"{http://www.alacre.com/cms/content-model-1.0}project" AND PATH:"app:company_home//*/cms:lost"
works, but the following doesn't:
+TYPE:"{http://www.alacre.com/cms/content-model-1.0}project" AND PATH:"app:company_home//*/cms:get lost"
I thought maybe it was because of the space in "get lost", which I replaced with "_", but it still doesn't work.
I am confused: in bootstrapped data, which properties determine the name of a node as used in a Lucene path query?
Labels:
- Labels:
-
Archive
4 REPLIES 4

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-15-2005 04:16 AM
Hi
There has been a change that will affect this query.
The PATH field now matches what would be required in XPATH.
Your query would not be a valid XPATH as it contains a space.
Characters not allowed in XML element names are encoded using ISO9075.
So you would need:
A restricted set of characters were all mapped to _ which was wrong.
The nodeService can be used to get Path objects which give the correct path via toString()
Cheers
Andy
There has been a change that will affect this query.
The PATH field now matches what would be required in XPATH.
Your query would not be a valid XPATH as it contains a space.
Characters not allowed in XML element names are encoded using ISO9075.
So you would need:
+TYPE:"{http://www.alacre.com/cms/content-model-1.0}project" AND PATH:"app:company_home//*/cms:get_x0020_lost"
A restricted set of characters were all mapped to _ which was wrong.
The nodeService can be used to get Path objects which give the correct path via toString()
Cheers
Andy
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-18-2005 08:27 PM
Hi,
Is searching in the TEXT field the same as searching inside a content property? Basically, if I am already searching on
do I need to search on:
A comment in SearchContext.java refers to using the "TEXT" field as doing a full text search. What does this full text include and where is this configured?
Thanks,
Is searching in the TEXT field the same as searching inside a content property? Basically, if I am already searching on
TEXT:"access*"
do I need to search on:
@\{http\://www.alfresco.org/model/content/1.0\}content:'access*"
A comment in SearchContext.java refers to using the "TEXT" field as doing a full text search. What does this full text include and where is this configured?
Thanks,

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-21-2005 03:37 AM
Hi
TEXT is a combined index of all content properties.
So you just need to search TEXT in the case you describe.
The individual properties are there for when you do not want to search all content attributes.
Regards
Andy
TEXT is a combined index of all content properties.
So you just need to search TEXT in the case you describe.
The individual properties are there for when you do not want to search all content attributes.
Regards
Andy

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-01-2009 04:06 AM
Sorry for refreshing such an old topic, but I'm chasing down an issue with the search functionality and the last entry in this topic troubles me somehow:
I have a custom metadata property (called "additionalComments") which shall also be searchable through the fulltext search. I could solve this for the simple search (upper-right-corner) by adding the following configuration:
However this does not affect the TEXT (Look for
field on the Advanced Search page. If the information above was still correct, I would assume that no additional configuration should be needed.
TEXT is a combined index of all content properties.Can somebody confirm whether this still applies to the current version (3.2)?
I have a custom metadata property (called "additionalComments") which shall also be searchable through the fulltext search. I could solve this for the simple search (upper-right-corner) by adding the following configuration:
<config> <client> <simple-search-additional-attributes> <qname>{http://www.alfresco.org/model/content/1.0}description</qname> <qname>{http://www.alfresco.org/model/content/1.0}title</qname> <qname>{my.model}additionalComments</qname> </simple-search-additional-attributes> </client> </config>
However this does not affect the TEXT (Look for

