I have a use case where I would like to search across two fields but I do not want to weight a document that has a match in both fields higher than a document that has a match in only 1 field.

For example.

Document 1
 - Field A: "Foo Bar"
 - Field B: "Foo Baz"

Document 2
 - Field A: "Foo Blarg"
 - Field B: "Something else"

Now when I search for "Foo" I would like document 1 and 2 to be similarly scored however document 1 will be scored much higher in this use case because it matches in both fields. I could create a third field and use copyField directive to search across that but I was wondering if there is an alternative way. It would be nice if we could search across some sort of "virtual field" that will use both underlying fields but not actually increase the size of the index.

Thanks

Reply via email to