473,387 Members | 1,757 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

tsearch questions

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)?
Jul 11 '06 #1
1 1758
Banfa
9,065 Expert Mod 8TB
I imagine that the purpose of compar is to compare the 2 values passed to it probably returning

-1 if parameter 1 is less than parameter 2
0 if parameter 1 equals parameter 2
-1 if parameter 1 is greater than parameter 2

This could be used to search within a tree presumably of the key value.
Jul 12 '06 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

0
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...
3
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...
13
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...
1
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...
4
by: Bas Scheffers | last post by:
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...
2
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.
3
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...
0
by: softwareengineer2006 | last post by:
All Interview Questions And Answers 10000 Interview Questions And Answers(C,C++,JAVA,DOTNET,Oracle,SAP) I have listed over 10000 interview questions asked in interview/placement test papers for...
0
by: connectrajesh | last post by:
INTERVIEWINFO.NET http://www.interviewinfo.net FREE WEB SITE AND SERVICE FOR JOB SEEKERS /FRESH GRADUATES NO ADVERTISEMENT
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
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,...
0
Oralloy
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,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.