Home

Cardbox Talk

 

CardboxForumsCardbox Talk > "Search for multi word (UK Post Code)"

Search for multi word (UK Post Code)

Current user: [none]
Register / Log In · Help

Posted By Post

Seeker

19-Apr-2017 14:13

I am trying to search by UK postcode so a typical field would be W1 4AA
I have read help and I would expect that to enter W1 4AA would get all records with W1 in plus all with 4AA in.
(Match All un-ticked and Word button only)
If I tick Match all I would expect to just get the ones I want. I don't even though I know there are at least 1 valid entry in one case.
From reading help it would appear that W1 +4AA should also work as should "W1 4AA" Both return zero results.
How to search is set to Search the database index.
If I set this to Search record data and tick "Entire field as one unit" I get a result, but it takes much longer.
Where am I going wrong?

bert

19-Apr-2017 16:00

I suppose that your databases was designed before Cardbox 3 was. Then a term starting with a number followed with text, only the number was indexed.
Example 124AB could be found as 123. Very confusing! This because for speed reasons Cardbox looked only to the first character of a term for deciding in which index it belongs (numbers or text).
However, at Cardbox 3 machines were much powerful, so it can look to the first character but can also look to whole term deciding where to index. If there is in a term a character, Cardbox stores it in the words index.
How to solve now your problem? There are different ways to get this. One shortest way I will describe here a short as possible. Take carefully each step.
1 Native Format, Edit Format
2 Menu - Edit - Collating Sequence - write to file - give it a name.
3 Close Cardbox.
4 Open that just written file with Notepad if you work with windows 10. Else I advise to open it using WRITE (WordPad) - this because it is a UTF-8 coded txt file.
5 Add as first line in that file: CHECKWHOLETERM - do not add something on that line. Next line starts the old content of the file. Do not change something more.
6 Save that file with same name.
7 Now in Cardbox, native format, edit format, menu, Edit, Collating Sequence, Load from file - yes, the file you've edited with Notepad/Wordpad.
8 When you did it right, no error message appear. If there are errors, no problem, you Cardbox files are not damaged. Close it and post detailed error messages.
9 If all is ok, save format and close edit format.
10. Now you have to tell to the database that the index rules are changed. Do that by menu: tools - management - rebuild - database. Use default options. Do not be afraid: rebuild first makes a copy of the existing database en calls it yournameofdatabase.old
Then is it time to look if your problem is solved.
Success,
Regards
Bert

bert

19-Apr-2017 17:16

"Example 124AB could be found as 123" should be read of course as "Example 124AB could be found as 124".
Excuse me,

Regards
Bert

Seeker

19-Apr-2017 17:19

Bert
Worked well thank you.
For clarification: at steps 1 and 7: Click Edit / Format / Edit. The top line of the display should show
"Cardbox - [database name - native format]"
This change will make the database much more useful.
Seeker

Quick Reply

Please log in or register before trying to post a reply.

 
© 2010 Cardbox Software Limited   Home