Query Lucene parse error QName with numbers

cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
razieltd
Member II

Query Lucene parse error QName with numbers

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
mikeh
Active Member II

Re: Query Lucene parse error QName with numbers

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
Member II

Re: Query Lucene parse error QName with numbers

you are right! Thanks  :wink: