views:

419

answers:

2

1.How much more efficient is sphinx doing in searching fulltext than by attribute?

If attribute search is much slower,for better performance,I'm gonna prefix the attribute

and append to fulltext search.

But when it requires range search,only attribute search can apply.

2.How to conduct attribute range search by sphinxapi in PHP?

A: 

1) why not just test it out? I've never had a problem with it either way.

2) http://www.sphinxsearch.com/docs/current.html#api-func-setfilterrange

Ty W
for 2,how to filter by a string attribute?The document says it must be integer.
Shore
by "attribute range search" I assumed that was a numeric range. I don't see how a string range would even make sense, but I don't know your application either. I guess if you need things starting with m through things starting with p you could convert the initial letter to a 1-26 integer attribute and filter on that.
Ty W
A: 

see http://www.sphinxsearch.com/forum/view.html?id=2908

for highly selective filter : fake keyword (1/100 for instance) sphinx does keyword match and then apply attribute filter by exclusion

Manfred Dardenne