Hello all, I need know how make some think as this, I have 4 fields in
my DB, I need make search using this way using relevance by field.

field1 "Article Title" (0.30)
field2 "Article Type" (0.30)
field3 "Article Description" (0.30)
field4 "Article Content" (0.10)

Using that I can organize my articles that the most important is
recovery for title, type, description.

Thanks

al.

Search Discussions

  • James Aylett at Nov 7, 2007 at 4:22 pm

    On Wed, Nov 07, 2007 at 11:15:52AM -0500, Aleph Thomas wrote:

    Hello all, I need know how make some think as this, I have 4 fields in
    my DB, I need make search using this way using relevance by field.

    field1 "Article Title" (0.30)
    field2 "Article Type" (0.30)
    field3 "Article Description" (0.30)
    field4 "Article Content" (0.10)

    Using that I can organize my articles that the most important is
    recovery for title, type, description.
    If you use scriptindex, you can bump the weight on the first three to
    3, and you should get that effect. (Assuming I understand correctly
    that you just want some fields to contribute more forcefully to the
    final rank of a matched document.)

    J

    --
    /--------------------------------------------------------------------------\
    James Aylett xapian.org
    james@tartarus.org uncertaintydivision.org
  • Aleph Thomas at Nov 7, 2007 at 4:37 pm
    Maybe that not solve my question, because, in case that I need put
    different relevance?, what I need put in my search query? Suppose tat
    I am using xapian

    thanks
    On 11/7/07, James Aylett wrote:
    On Wed, Nov 07, 2007 at 11:15:52AM -0500, Aleph Thomas wrote:

    Hello all, I need know how make some think as this, I have 4 fields in
    my DB, I need make search using this way using relevance by field.

    field1 "Article Title" (0.30)
    field2 "Article Type" (0.30)
    field3 "Article Description" (0.30)
    field4 "Article Content" (0.10)

    Using that I can organize my articles that the most important is
    recovery for title, type, description.
    If you use scriptindex, you can bump the weight on the first three to
    3, and you should get that effect. (Assuming I understand correctly
    that you just want some fields to contribute more forcefully to the
    final rank of a matched document.)

    J

    --
    /--------------------------------------------------------------------------\
    James Aylett xapian.org
    james@tartarus.org uncertaintydivision.org

    _______________________________________________
    Xapian-discuss mailing list
    Xapian-discuss@lists.xapian.org
    http://lists.xapian.org/mailman/listinfo/xapian-discuss
  • James Aylett at Nov 7, 2007 at 4:41 pm

    On Wed, Nov 07, 2007 at 11:37:37AM -0500, Aleph Thomas wrote:

    Maybe that not solve my question, because, in case that I need put
    different relevance?, what I need put in my search query? Suppose tat
    I am using xapian.
    Weighting the terms generated from different input fields at index
    time means that you don't have to do anything at all at search time -
    it will just work.

    J

    --
    /--------------------------------------------------------------------------\
    James Aylett xapian.org
    james@tartarus.org uncertaintydivision.org
  • Olly Betts at Nov 7, 2007 at 4:52 pm

    On Wed, Nov 07, 2007 at 04:41:22PM +0000, James Aylett wrote:
    On Wed, Nov 07, 2007 at 11:37:37AM -0500, Aleph Thomas wrote:

    Maybe that not solve my question, because, in case that I need put
    different relevance?, what I need put in my search query? Suppose tat
    I am using xapian.
    Weighting the terms generated from different input fields at index
    time means that you don't have to do anything at all at search time -
    it will just work.
    The approach James suggests will work, if I understand the original
    question.

    But its limitations are that the relative importance of the fields is
    fixed at index time, and that the factors have to be integers.

    You can achieve a similar effect at search time by varying the wqf
    (within query frequency) of terms in the query, but again the factors
    have to be integers.

    As of 1.0.4, you can use OP_SCALE_WEIGHT to increase or decrease the
    importance of subqueries, which allows this to be done at query time so
    the relative importance of the fields can be varied easily. And
    OP_SCALE_WEIGHT allows the factor to any non-negative real number.

    Cheers,
    Olly

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupxapian-discuss @
categoriesxapian
postedNov 7, '07 at 4:15p
activeNov 7, '07 at 4:52p
posts5
users3
websitexapian.org
irc#xapian

People

Translate

site design / logo © 2021 Grokbase