Hi Max
I don’t think Sphinx allows you to rank specific query parts more than others,
unfortunately. Perhaps that’s a question worth asking on the Sphinx forum
instead.
But as for combining records, if you’re willing to lose any pagination
information, the following should do the trick:
tags = Tag.search(with: {level: 1}).to_a
tags += Tag.search(with: {level: 2}).to_a
—
Pat
On 10 Dec 2013, at 8:38 pm, Max NudePatch <[email protected]> wrote:
> Hi.
> I have few query masks and I want Sphinx to return result by my order.
> For example here is 3 masks I use
> "^hello world"
> "^hello world"
> "^hello world*"
>
> If I put it in the single query like .search(q1 | q2 | q3)
> Sphinx return records sorted by default alghorithm. And I do need this
> alghorithm but only after mine order executed.
>
> So the first solution was to do 3 separate query.
>
> But I don't know why, it doesnt' work like I expected. Rails just skips the
> line.
>
> If I do active record request, everything is ok. 2 queries.
> tags = Tag.where(level: 1)
> tags += Tag.where(level: 2)
>
> but sphinx second query doesn't work
>
> tags = Tag.search(with: {level: 1})
> tags += Tag.search(with: {level: 2})
>
> =(
>
> --
> You received this message because you are subscribed to the Google Groups
> "Thinking Sphinx" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/thinking-sphinx.
> For more options, visit https://groups.google.com/groups/opt_out.
--
You received this message because you are subscribed to the Google Groups
"Thinking Sphinx" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/thinking-sphinx.
For more options, visit https://groups.google.com/groups/opt_out.