I'm looking for a way to copy from a dynamic field to another dynamic field.

I found this post from september:
http://www.nabble.com/copyField-to-a-dynamic-field-tf2300115.html#a6419101

Essentially, I have:
 <field name="tag_*"   type="string" ... />
 <field name="text_*"  type="text"   ... />

and want:
 <copyField source="tag_(.*)" dest="text_\1" />

Any thoughts about how to implement this?

Matching the pattern looks straight forward and would not adversely affect the speed for anything that does not use patterns, but generating a dynamic field would require changing the final targetField variable in IndexSchema.DynamicCopy to a function.

There is a comment that says:  (line 655)
// Instead of storing a type, this could be implemented as a hierarchy
// with a virtual matches().
// Given how often a search will be done, however, speed is the overriding
// concern and I'm not sure which is faster.

Any lasting concerns?


thanks
ryan





Reply via email to