dqk42179 2011-09-21 00:03
浏览 141

Sphinx搜索具有不同属性的多个索引

Is it possible to search on multiple indexes with different attributes and keep consistent PAGIN.

For example we have 2 indexes:

  1. Places with GEO data
  2. Objects without GEO data

And we want to to apply GEO filters for index #1(SetFilterFloatRange, SetGeoAnchor) and SKIP this filter for index #2. We want to show these results in one result set with one paging.

Is it possible with SPHINX?

  • 写回答

1条回答 默认 最新

  • dongshou9878 2012-04-23 09:10
    关注

    No, this is not currently possible - you will receive an error if you try to do so.

    The workaround for this would be to have the same field inside the index #2, but with some value, which indicates that this check should be skipped.

    Your search query might look like this: (@somefield ("%s") | @somefield ("NONE")), where NONE is your "empty value" and %s is the string you are actually looking for.

    评论

报告相同问题?