Hi Danil,

We currently use the kill_list and datetime deltas in production and
have had quite a bit of success with it.

Although, we had to fork ThinkingSphinx to get the required
functionality we wanted.  You can see them here:

http://github.com/adamcooper/ts-datetime-delta/commits/killlist_integration
http://github.com/adamcooper/thinking-sphinx/tree/killlist_integration

Although, we only really needed to add this to get the facet count to
work properly.  We had to add an additional tracking table to track
the latest time of the full index.  We also disabled the index merging
functionality as deleted records would re-appear.

I think a simple fix to your problem would be to change this line:

  set_property :sql_query_killlist => "SELECT id FROM
#{Project.quoted_table_name} WHERE state='archived' OR state='pfrozen'
OR state='started' OR state='unpublished'"

to

  set_property :sql_query_killlist => "SELECT `projects`.`id` * 5 + 3
AS `id` FROM #{Project.quoted_table_name} WHERE state='archived' OR
state='pfrozen' OR state='started' OR state='unpublished'"

I believe the killlist does not impact indexing (preventing records
from appearing in the index) but it affects the querying.  When TS
makes a search query against two indexes (delta and main) sphinx will
actually insert a killist after the index that defines the killlist
and if it finds a record in the killlist will prevent that query from
continuing on to the next index.



On Oct 14, 7:29 pm, Pat Allan <[email protected]> wrote:
> Hi Danil
>
> I've not actually used the kill list before, so I'm not sure how it behaves.
>
> Is there anything in the delta indexing output that indicates it's being 
> used? I wonder if whether the records that are being deleted are in the core 
> index (not the delta one), and the kill list would only impact the delta 
> index when delta indexing happens?
>
> And please do keep in mind that the kill list only has an impact for 
> indexing, not on model changes.
>
> Hope this helps.
>
> Cheers
>
> --
> Pat
>
> On 09/10/2010, at 12:35 AM, Danil Kutkevich wrote:
>
>
>
> > Hello,
>
> > I'm trying to use sql_query_killlist property as recommended in
> > documentation:
> > <http://sphinxsearch.com/docs/manual-0.9.9.html#conf-sql-query-killlist>
>
> >    set_property :sql_query_killlist => "SELECT id FROM 
> > #{Project.quoted_table_name} WHERE state='archived' OR state='unpublished'"
>
> > I got the following sphinx.conf in gist: <http://gist.github.com/616532>.
> > Other info such as Ruby version, gems installed etc. is in gist also.
>
> > I use Delta Indexes as described here
> > <http://freelancing-god.github.com/ts/en/deltas.html>
>
> >    set_property :delta => :datetime, :threshold => 10.minutes
>
> > Index description may be found in gist.
>
> > sql_query_killlist doesn't work as I expect: in serch result i got
> > records that are supposed to be excluded by sql_query_killlist
>
> > Thank you in advance.
>
> > --
> > You received this message because you are subscribed to the Google Groups 
> > "Thinking Sphinx" group.
> > To post to this group, send email to [email protected].
> > To unsubscribe from this group, send email to 
> > [email protected].
> > For more options, visit this group 
> > athttp://groups.google.com/group/thinking-sphinx?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
"Thinking Sphinx" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/thinking-sphinx?hl=en.

Reply via email to