[Zope3-Users] TextIndexNG ranking questions

2008-04-15 Thread Thierry Florac

  Hi,

I'm currently using TextIndexNG-3.2.0 as well as other zc.catalog
indexes in a Zope-3.3.1 application.
Indexing several fields as well as external files seems OK, but now I'm
facing a few interrogations about searching and ranking :

1. I've created TXNG indexes with a term_frequencies storage and
ranking enabled = OK

2. I'm now using hurry.query package to run queries on a set of
catalogs ; it's generally OK but my main question are :

- how can I use TXNG ranking feature when running a single query against
several indexes (actually I have to run queries against several
ValueIndex indexes, matching workflow status and publication date, and
one or two TextIndexNG indexes -- one for title and another one for
content) ? How can I be sure that my results order is matching
ranking ??

- does a ranking query generate a numeric value which could be used to
display to users the relevance of found results ?


Thanks for any help,

  Thierry Florac
-- 
  Chef de projet intranet/internet
  Office National des Forêts - Département Informatique
  2, Avenue de Saint-Mandé
  75570 PARIS Cedex 12
  Mél : [EMAIL PROTECTED]
  Tél. : +33 01.40.19.59.64
  Fax. : +33 01.40.19.59.85

___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] TextIndexNG ranking questions

2008-04-15 Thread Andreas Jung



--On 15. April 2008 12:51:15 +0200 Thierry Florac [EMAIL PROTECTED] 
wrote:




  Hi,

I'm currently using TextIndexNG-3.2.0 as well as other zc.catalog
indexes in a Zope-3.3.1 application.
Indexing several fields as well as external files seems OK, but now I'm
facing a few interrogations about searching and ranking :

1. I've created TXNG indexes with a term_frequencies storage and
ranking enabled = OK

2. I'm now using hurry.query package to run queries on a set of
catalogs ; it's generally OK but my main question are :

- how can I use TXNG ranking feature when running a single query against
several indexes (actually I have to run queries against several
ValueIndex indexes, matching workflow status and publication date, and
one or two TextIndexNG indexes -- one for title and another one for
content) ? How can I be sure that my results order is matching
ranking ??


Using the ranking of TextIndexNG makes basially only sense when you perform 
a query against the index alone - not in combination with queries against 
other fields.


Andreas

pgphuyLLaK9AY.pgp
Description: PGP signature
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] TextIndexNG ranking questions

2008-04-15 Thread Thierry Florac
Le mardi 15 avril 2008 à 13:18 +0200, Andreas Jung a écrit :
 Using the ranking of TextIndexNG makes basially only sense when you perform 
 a query against the index alone - not in combination with queries against 
 other fields.

Yes, that's what I thought... :-(
So is there an easy way to intersect the results of several distinct
queries, so that the results order provided by TextIndexNG and following
ranking is kept ??

Thanks,

  Thierry Florac
-- 
  Chef de projet intranet/internet
  Office National des Forêts - Département Informatique
  2, Avenue de Saint-Mandé
  75570 PARIS Cedex 12
  Mél : [EMAIL PROTECTED]
  Tél. : +33 01.40.19.59.64
  Fax. : +33 01.40.19.59.85

___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] TextIndexNG ranking questions

2008-04-15 Thread Andreas Jung



--On 15. April 2008 13:46:09 +0200 Thierry Florac [EMAIL PROTECTED] 
wrote:



Le mardi 15 avril 2008 à 13:18 +0200, Andreas Jung a écrit :

Using the ranking of TextIndexNG makes basially only sense when you
perform  a query against the index alone - not in combination with
queries against  other fields.


Yes, that's what I thought... :-(
So is there an easy way to intersect the results of several distinct
queries, so that the results order provided by TextIndexNG and following
ranking is kept ??


Intersection is likely possible. However I don't know about the 
implementation of hurry.catalog or the other related Zope 3 components.

Performing two queries and intersecting the results (e.g. given by paths,
UIDs or whatever) is basically supported through the various BTree types
or Zope or by Python's set module..

Andreas

pgp9qefjusFhX.pgp
Description: PGP signature
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] TextIndexNG ranking questions

2008-04-15 Thread Thierry Florac
Le mardi 15 avril 2008 à 14:03 +0200, Andreas Jung a écrit :
 Intersection is likely possible. However I don't know about the 
 implementation of hurry.catalog or the other related Zope 3 components.
 Performing two queries and intersecting the results (e.g. given by paths,
 UIDs or whatever) is basically supported through the various BTree types
 or Zope or by Python's set module..

Intersecting is possible, but BTrees and sets dont support ordering...
So I suppose that I have to convert search results to lists and to
merge/intersect them manually...
Or, given a set (containing final results set intersection) and a list
(containing TextIndexNG results, ordered by ranking), is it possible to
EFFICIENTLY get items of the set in the order in which they are stored
in the list ??

Thanks,

  Thierry Florac
-- 
  Chef de projet intranet/internet
  Office National des Forêts - Département Informatique
  2, Avenue de Saint-Mandé
  75570 PARIS Cedex 12
  Mél : [EMAIL PROTECTED]
  Tél. : +33 01.40.19.59.64
  Fax. : +33 01.40.19.59.85

___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users