php - Zend Lucene search related fields? -


i have lot of paired fields (hoursdistance1, cityname1, hoursdistance2, cityname2, hoursdistance3, cityname3, etc.).

what query need search lucene scores based on both fields having correct terms instead of 1 of them? i.e. if search city 3 hours here name, how return results hoursdistancen 3 hours here , citynamen without scoring other pairs of fields?

you create document each pair. instead of

id | hours1 | name1 | hours2 | name2 | ... 

you have:

id | pair_num = 1 | hours | name id | pair_num = 2 | hours | name ... 

since want search 1 pair @ time, shouldn't need merge results or anything.


Comments

Popular posts from this blog

android - Spacing between the stars of a rating bar? -

html - Instapaper-like algorithm -

c# - How to execute a particular part of code asynchronously in a class -