I am wondering if the following can be achieved using the solr schema file?
I have a multivalued field being imported that has data like
- Products
- Products/Computers
- Products/Computers/Laptop
- Products/Computers/Laptops/Webcams
Now, what I would like to do is add a value to the start of each value when being imported example like a depth indicator….
- C0/Products
- C1/Products/Computers
- C2/Products/Computers/Laptops
- C3/Products/Computers/Laptops/Webcams
Anyone know if this is possible or will I best be looking at doing the transformation at my datasource before the import?
Thanks in advance any help or pointers would be appreciated 🙂
I guess you can achieve that with a ScriptTransformer, by counting the number of separators (/) and prepending the CNumber to the value.
But if you are preprocessing the data to index it, then I would take do that in there, if you avoid the ScriptTransformer indexing will be faster and you would have less hassle.