Re: [GENERAL] tsearch2: word position

2007-02-22 Thread Teodor Sigaev
No, the first X aren't more important, but being able to determine word proximity is very important for partial phrase matching and ranking. The closer the words, the "better" the match, all else being equal. exactly ---(end of broadcast)--- TIP

Re: [GENERAL] tsearch2: word position

2007-02-22 Thread Markus Schiltknecht
Hi, Mike Rylander wrote: No, the first X aren't more important, but being able to determine word proximity is very important for partial phrase matching and ranking. The closer the words, the "better" the match, all else being equal. Ah, yeah, for word-pairs, that certainly helps. Thanks. Re

Re: [GENERAL] tsearch2: word position

2007-02-22 Thread Mike Rylander
On 2/22/07, Markus Schiltknecht <[EMAIL PROTECTED]> wrote: Hello Teodor, Teodor Sigaev wrote: > byte offset of word is useless for ranking purpose Why is a word number more meaningful for ranking? Are the first 100 words more important than the rest? That seems as ambiguous as saying the first

Re: [GENERAL] tsearch2: word position

2007-02-22 Thread Markus Schiltknecht
Hello Teodor, Teodor Sigaev wrote: byte offset of word is useless for ranking purpose Why is a word number more meaningful for ranking? Are the first 100 words more important than the rest? That seems as ambiguous as saying the first 1000 bytes are more important, no? Or does the ranking w

Re: [GENERAL] tsearch2: word position

2007-02-22 Thread Teodor Sigaev
Huh? I explicitly *want* positional information. But I find the word number to be less useful than a character number or a simple (byte) pointer to the position of the word in the string. Given only the word number, I have to go and parse the string again. byte offset of word is useless for r

Re: [GENERAL] tsearch2: word position

2007-02-22 Thread Markus Schiltknecht
Hi, Teodor Sigaev wrote: Word number is used only in ranking functions. If you don't need a ranking than you could safely strip positional information. Huh? I explicitly *want* positional information. But I find the word number to be less useful than a character number or a simple (byte) poi

Re: [GENERAL] tsearch2: word position

2007-02-22 Thread Teodor Sigaev
to_tsvector() could as well return the character number or a byte pointer, I could see advantages for both. But the word number makes little sense to me. Word number is used only in ranking functions. If you don't need a ranking than you could safely strip positional information. -- Teodor

Re: [GENERAL] tsearch2: word position

2007-02-22 Thread Markus Schiltknecht
Hi, Teodor Sigaev wrote: I'm fiddling with to_tsvector() and parse() from tsearch2, trying to get the word position from those functions. I'd like to use the tsearch2 parser and stemmer, but I need to know the exact position of the word as well as the original, unstemmed word. It's not suppo

Re: [GENERAL] tsearch2: word position

2007-02-21 Thread Markus Schiltknecht
Hello Teodor, Teodor Sigaev wrote: It's not supposed usage... Why do you need that? Well, long story... I'm still using my own indexing on top of the tsearch2 parsers and stemming. However, two obvious cases come to mind: - autocompletion, where I want to give the user one of the possible

Re: [GENERAL] tsearch2: word position

2007-02-21 Thread Teodor Sigaev
I'm fiddling with to_tsvector() and parse() from tsearch2, trying to get the word position from those functions. I'd like to use the tsearch2 parser and stemmer, but I need to know the exact position of the word as well as the original, unstemmed word. It's not supposed usage... Why do you nee

[GENERAL] tsearch2: word position

2007-02-21 Thread Markus Schiltknecht
Hi, I'm fiddling with to_tsvector() and parse() from tsearch2, trying to get the word position from those functions. I'd like to use the tsearch2 parser and stemmer, but I need to know the exact position of the word as well as the original, unstemmed word. What I came up with so far is prett