cancel
Showing results for 
Search instead for 
Did you mean: 

Query Lucene parse error QName with numbers

razieltd
Champ in-the-making
Champ in-the-making
Hi all!

i have this space cm:my-config/cm:2010try

cm:2010try (have some cm:content - txt files)

if i try on node browser to find the prev space (PATH:"//cm:my-config") no problem lucene find me 1 row
but if i try to search PATH:"//cm:my-config/cm:2010try"   or PATH:"//cm:2010try"

it says me that:
                         Search failed due to: org.alfresco.repo.search.SearcherException: Failed to parse query: PATH:"//cm:2010try"
or
                         Search failed due to: org.alfresco.repo.search.SearcherException: Failed to parse query: PATH:"//cm:my-config/cm:2010try"

why? what can i do to solve this problem?

Thanks
2 REPLIES 2

mikeh
Star Contributor
Star Contributor
From here: http://wiki.alfresco.com/wiki/Search#ISO_9075_encoding
XML attribute names can only start with and contain certain characters.

You need to ISO9075-encode each property value, i.e.
search.ISO9075Encode(string value)

Note: that's each individual value, not the whole string.

Thanks,
Mike

razieltd
Champ in-the-making
Champ in-the-making
you are right! Thanks  :wink: