Replace the commas with a space. This will (generally) cause Lucene to index each "number" separately and then you can search against them.
(I say generally because some analyzers will ignore numbers, such as the Stop and Simple analyzers, but if you're not changing the analyzer from the default then you wont have a problem with them being ignored)
Got as far as adding the id's to the index as separate entries using the GatheringNodeData event
The last piece in the jigsaw is to be able to search "__attributePicker" for results that match both 1055 & 1058. It's here where I'm stuck as I don't know how to build up the examine search query.
MultiNodePicker & Examine
Hi,
I’m trying to search the following property using the excellent MultiNodePicker, the new Beta allows the data to be stored in two ways:
OR
How would I use Examine to return for example the nodes which match 1057 AND 1060?
I have Examine set up and working but not sure which criteria to use to match this.
Many thanks
Rich
Rich,
See http://our.umbraco.org/forum/developers/extending-umbraco/11667-GatheringNodeData-examine-event?p=0#comment45722
Ok,
I've got as far as adding this to the index
I added the extra commas as I did not want the possibility of 1055 to match 1055 & 11055.
All I want to do now is something like the following:
However at this point I realised I've probably not approached this correctly and the above doesn't work.
I'm completely new to Examine/Lucene so would appreciate it if someone point me in the right direction.
Thanks
Rich
Replace the commas with a space. This will (generally) cause Lucene to index each "number" separately and then you can search against them.
(I say generally because some analyzers will ignore numbers, such as the Stop and Simple analyzers, but if you're not changing the analyzer from the default then you wont have a problem with them being ignored)
Thanks,
Got as far as adding the id's to the index as separate entries using the GatheringNodeData event
The last piece in the jigsaw is to be able to search "__attributePicker" for results that match both 1055 & 1058. It's here where I'm stuck as I don't know how to build up the examine search query.
Many thanks
Rich
You could use the GroupedOr statement, that'd be the easiest way to do the search:
That will find all the ones which have either of the ID's, you can use GroupedAnd if you want to make it ones with just those IDs
Thanks Slace! Worked perfect :)
Next issue, how & when do I remove this indexes when either a node is deleted or a value is removed from the MNTP field?
Rich
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.