One of my properties being indexed has the following format: "this is value 1,this is value 2,this is value 3"
I dont want the indexer to split this property on whitespace, but on comma. Can I use a different analyzer?
How can I query this to get a match on each split value? Now I have to do a fuzzy query and then I get hits on all of them if I e.g. use the following query "this is value 1"
Check out this blog post here http://www.farmcode.org/category/uComponents.aspx this is splitting the CSV values of the uComponents MNTP but you can use the same process to split your values by comma.
Hi Stig, I believe I have the same requirement as you.
Firstly, I have an index set that has user fields with the following format: "1234,1236,2345". At present I can only get it to match this field if the content is exact, i.e. if I update the field to just "1234" and search for that exact term. Can I ask how you solved this? Were you using an incorrect analyzer?
Secondly, how did you handle matching as you asked above. I want to search for "1234" and it to return the node containing the value "1234,1236,2345" in the property specified in my user-defined fields index.
Examine analyzer
One of my properties being indexed has the following format: "this is value 1,this is value 2,this is value 3"
I dont want the indexer to split this property on whitespace, but on comma. Can I use a different analyzer?
How can I query this to get a match on each split value? Now I have to do a fuzzy query and then I get hits on all of them if I e.g. use the following query "this is value 1"
Any suggestions? Different analyzer?
Stig
Hey Stig,
Check out this blog post here http://www.farmcode.org/category/uComponents.aspx this is splitting the CSV values of the uComponents MNTP but you can use the same process to split your values by comma.
Code sample also here http://our.umbraco.org/forum/developers/extending-umbraco/11667-GatheringNodeData-examine-event?p=0
Rich
@Stig, you could use the Examine indexing events to replace commas with spaces maybe?
Hi Stig,
I believe I have the same requirement as you.
Firstly, I have an index set that has user fields with the following format: "1234,1236,2345". At present I can only get it to match this field if the content is exact, i.e. if I update the field to just "1234" and search for that exact term. Can I ask how you solved this? Were you using an incorrect analyzer?
Secondly, how did you handle matching as you asked above. I want to search for "1234" and it to return the node containing the value "1234,1236,2345" in the property specified in my user-defined fields index.
is working on a reply...