Hi,
Is there a way to use tsearch so that it returns documents that have less
than all the required keywords? The idea is that if a document only has 3
out of 4 terms, it is still returned, but with a lower ranking.
So far I haven't found a way to do this in the documentation. Is there
something like a "maybe" operator? (ie: 'foo&bar&~doh', meaning documents
with foo and bar, and optionaly doh, but those with would be ranked
higher)
Cheers,
Bas.
---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddres sHere" to ma*******@postg resql.org) 4 1824
Bas Scheffers wrote: Hi,
Is there a way to use tsearch so that it returns documents that have less than all the required keywords? The idea is that if a document only has 3 out of 4 terms, it is still returned, but with a lower ranking.
So far I haven't found a way to do this in the documentation. Is there something like a "maybe" operator? (ie: 'foo&bar&~doh', meaning documents with foo and bar, and optionaly doh, but those with would be ranked higher)
(foo&bar)|(foo& bar&doh)
I think, it's what you want.
--
Teodor Sigaev E-mail: te****@sigaev.r u
---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster
Teodor Sigaev said: (foo&bar)|(foo& bar&doh) I think, it's what you want.
That simple huh? Can become a bit complicated, doing an OR for all the
different combinations, but a quick test I just did did show a higher
ranking for the documents that matched the larger query. And quite usable
in my application.
Do big queries have a significant inpact on search performance? (this is
something that is important!)
Thanks,
Bas.
---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddres sHere" to ma*******@postg resql.org)
On Mon, 9 Feb 2004, Bas Scheffers wrote: Teodor Sigaev said: (foo&bar)|(foo& bar&doh) I think, it's what you want. That simple huh? Can become a bit complicated, doing an OR for all the different combinations, but a quick test I just did did show a higher ranking for the documents that matched the larger query. And quite usable in my application.
Do big queries have a significant inpact on search performance? (this is something that is important!)
Sure :( In degenerated case you end with query like (word1|word2|wo rd3|..|wordN)
and it's equivalent running N searches with single word query, which isn't
effective. Intrinsically, tsearch2 is much faster for long AND queries,
which is opposite to standard search engines based on inverted indexes. Thanks, Bas.
---------------------------(end of broadcast)--------------------------- TIP 2: you can get off all lists at once with the unregister command (send "unregister YourEmailAddres sHere" to ma*******@postg resql.org)
Regards,
Oleg
_______________ _______________ _______________ _______________ _
Oleg Bartunov, sci.researcher, hostmaster of AstroNet,
Sternberg Astronomical Institute, Moscow University (Russia)
Internet: ol**@sai.msu.su, http://www.sai.msu.su/~megera/
phone: +007(095)939-16-83, +007(095)939-23-83
---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to ma*******@postg resql.org so that your
message can get through to the mailing list cleanly
Oleg Bartunov wrote: On Mon, 9 Feb 2004, Bas Scheffers wrote:
Teodor Sigaev said:
(foo&bar)|(f oo&bar&doh) I think, it's what you want.
That simple huh? Can become a bit complicated, doing an OR for all the different combinations, but a quick test I just did did show a higher ranking for the documents that matched the larger query. And quite usable in my application.
Do big queries have a significant inpact on search performance? (this is something that is important!)
Sure :( In degenerated case you end with query like (word1|word2|wo rd3|..|wordN) and it's equivalent running N searches with single word query, which isn't effective. Intrinsically, tsearch2 is much faster for long AND queries, which is opposite to standard search engines based on inverted indexes.
Ugh. The performance for complex query such as
(foo&bar)|(foo& bar&doh)|(foo&b ar&doh&other)
will be equals to simple query foo&bar, because other variants is a stronger
that simplest variant. Performance is defined by number of page readed (we
suppose that CPU is much faster than disks) and if more ANDed words in query
than smaller number of readed pages.
--
Teodor Sigaev E-mail: te****@sigaev.r u
---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Amir Michail |
last post by:
Hi,
Google is good, but not perfect.
CollaborativeRank takes Google rankings as a starting point but allows
users to tweak them in a collaborative way to achieve something even
better.
Perhaps some people in this group might be interested in producing even
better rankings for python related queries?
|
by: Joerg Erdmenger |
last post by:
Hi there,
I have an issue with tsearch. I'm using tsearch as a search mechanism on a
website making various queries created from the words that a user has put in.
So I query for all the words put in combined with a logical 'and' and also a
query with all the words combined with a logical 'or'. In the 'and' case
stopwords are correctly...
|
by: Joerg Erdmenger |
last post by:
Hi there,
me again. How do I find the stopwords that tsearch uses in its standard
configuration? I've looked at contrib/tsearch/dict/porter_english.dct and get
a feeling it's somewhere in there but I can't decipher it. Any suggestions?
Joerg
---------------------------(end of broadcast)---------------------------
|
by: Nigel J. Andrews |
last post by:
This will be a little vague, it was last night and I can't now do the test in
that db (see below) so can't give the exact wording.
I seem to remember a report a little while ago about tsearch v2 causing
unexpected backend exit messages with 7.3.4 and now I'm getting similar
messages unpredictably and I can't find the thread in the archives...
|
by: sector119 |
last post by:
Hi
Is there some one who was able to create ukrainian or russian-urainian
stemmer dict for tsearch v2?
--
WBR, sector119
---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo@postgresql.org so that your
| |
by: Rajesh Kumar Mallah |
last post by:
Hi,
I think when search terms have "."s in them they become case sensitive
in tsearch searches. How can we make them insensitive?
Regds
Mallah.
|
by: Marcel Boscher |
last post by:
For now i am almost statisfied with my tsearch2 installation war over night
somehow it seems to work, finally...
3 probably easy questions remain...
1.) Is it possible to index already filled tables?
2.)Can i have seperated indexes for different columns in a table
3.) Can i create an extra Table just for my indexes that is not included
in...
|
by: linbl352 |
last post by:
Does anybody can tell me the following answers?
In the description of tsearch function, what is purpose of the callback function( compar) as follows:
void *tsearch(const void *key, void **rootp,
int(*compar)(const void *, const void *));
also, basicly what are the two parameters in the function (compar)?
|
by: jocknerd |
last post by:
About 10 years ago, I wrote a C app that would read scores from
football games and calculate rankings based on the outcome of the
games. In fact, I still use this app. You can view my rankings at
http://members.cox.net/jocknerd/football.
A couple of years ago, I got interested in Python and decided to
rewrite my app in Python. I got it...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it. ...
| |
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |