473,326 Members | 2,108 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,326 software developers and data experts.

Boolean Search

Hi all,

Before I embark on a quest to improve our site search I was wondering if
anyone knew of any good articles or has any advice on how to achieve what I
want.

I want to be able to allow the user to add a + or - before the words in the
search criteria (like Google) to specify words that must or must not be in
the results.

The way I am contemplating doing this at the moment would be it take the
search criteria and split it into an array by the space character, then
iterate through that and create two separate arrays, one containing all of
the words that have a + and one that contains all the words that contain
a -.

I would then construct a sql query using the first array and then at the end
a criteria using NOT = and then the words in the second array.

Does this sound like a plan?

If so, how would I get around an exact phrase search, whereby the user may
enter ".net for dummies" -2.0

If I used the above approach I would have now split the criteria by the
space character and lost the ability to use the "'s....

That would suggest that I would need to split the search criteria by the
quotes in the first place, but if I do that I'd end up with 2 strings, one
would equal .net for dummies and the other would equal -2.0 , and I'd have
no idea which contained the exact phrase...especially when a user might do
something like this:

+piggy "charlottes web" -farm

Can anyone help me out with this?

My project is seaching index server, so far its working well and has a very
pleasing output, I now want to add additional functionality/support to it.

Thanks in advance,

Regards

Rob

Aug 10 '07 #1
0 1106

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: David | last post by:
Hi, I'm trying to add a search facility to a page that looks for matches in one, other or both memo fields of a database. The code below works fine if the visitor types in one word, or the term...
1
by: leegold | last post by:
Show full header Is there any way to make relevance when using boolean mode more useful? If not, are there plans in the Fulltext development "todo" for making it useful? I'm thinking of just...
0
by: phillip.s.powell | last post by:
SELECT id, student_first_name, student_last_name, major, minor , MATCH(major, minor) AGAINST ('"mechanical engineering"') AS score FROM students WHERE MATCH(major, minor) AGAINST ('"mechanical...
1
by: keithb | last post by:
The following code sets a DataTable column DataType to "String" column.DataType = System.Type.GetType("System.String"); What is the corresponding statement when the data type is boolean? I...
0
by: Malte | last post by:
Hello there, We got a problem atm with our 20k database. Everytime we search for sth. with double quotes it takes much more longer than without. Here is what we did: mysql> SELECT COUNT(*)...
3
by: Corey-g via AccessMonster.com | last post by:
Hi All, I did search for this before posting but I didn't find what I was looking for. .. I have a function (returning boolean) that in turn calls 2 more functions (also returning boolean). ...
4
by: Phaelle | last post by:
Hi! I am doing a search engine and I would like to make a search with the operator AND possible but I can´t find out how. Do I have to explode the phrase entered after each and" or does it exist an...
4
by: Ironr4ge | last post by:
Hi everyone, I am trying to open the form "Languages" with a diffrent record source to the "Contacts" form where I conducted the search or filter... . I was wondering whether there was a vba...
3
by: kenny rullo | last post by:
Hello people, I'm a new member of this fantastic community! I'm a student and i have to solve this puzzle: I have a string like "The quick brown fox jumps over the lazy dog" (or longer) I...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

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.