Gossamer Forum
Home : Products : DBMan : Customization :

Search priority field

Quote Reply
Search priority field
Hi,

I was wondering, it must have been asked before, but I couldn't find it: is it possible (and if so, how?) to ensure that if a person searches for x, that if for example 'x' is found in the title field of a record it weighs more than if it's found only in the text field? And that in this case the record with x in the title field shows up above the other one in the results list?

Thanks!

p.s. I also checked the dbman faq, but couldn't find anything at 'searching' there neither...

Lex
Quote Reply
Re: [Lex] Search priority field In reply to
I would suggest using an advanced search form rather than a keyword search and then people can search within the title field for what they are looking for.

For keyword searches you may want to set the results up to sort by the title field, which could provide the results you are looking for?

Unoffical DBMan FAQ

http://creativecomputingweb.com/dbman/index.shtml/
Quote Reply
Re: [LoisC] Search priority field In reply to
In Reply To:
I would suggest using an advanced search form rather than a keyword search and then people can search within the title field for what they are looking for.

For keyword searches you may want to set the results up to sort by the title field, which could provide the results you are looking for?

Hi LoisC,

sounds good, but not good enough :)

So, let's start putting thoughts together, would the way of achieving this be the following:

a) search for the word in the title field, store the results
b) search for the word in the text field, store the results
c) search in other fields

give priority to a + b + c
otherwise a + b
otherwise a + c
otherwise a
then b + c
then b
then c

Is that the way this needs to be done?

I am seriously surprised this hasn't been done before, I was sure someone would reply with a link to a thread...

Thanks for thinking along!

Lex
Quote Reply
Re: [Lex] Search priority field In reply to
I forgot to mention what it's for. It's for a magazine script. If people search the articles for 'new york', I want articles that have 'new york' in the title to show up first etc...

(just to make it become more 'real'...)
Quote Reply
Re: [Lex] Search priority field In reply to
I think threads for this would be listed in the FAQ under the section for 'sorting' rather than 'searching'.

I glanced at this thread and it may provide some help:

DBFAQ title:
Sort on Multiple Fields

Here in the forum the thread reference is:

Subject Sort on.......
donm 26-Sep-99

I know Kellner has also provided different means of sorting search results.

Unoffical DBMan FAQ

http://creativecomputingweb.com/dbman/index.shtml/
Quote Reply
Re: [LoisC] Search priority field In reply to
Thanks, but I think I wasn't very clea with what I'm actually looking for. (I looked at the places you mentioned and found other info)

Keyword searching, that's what I meant. Now say for example somebody's doing a keyword search for 'oil', I'd like th records that have 'oil' in the title somewhere to show up earlier that those that have 'oil' in another textfield somewhere.

Has this been done?