Page 1 of 2

Search multiple field on one line

PostPosted: Fri Aug 25, 2017 3:33 pm
by Ernst
Has anybody done or can help with multiple fields on one line. We are looking for something similar to using the three search lines with and AND,but for speed of use just want to type it all on the first line.

So in the demo for example going to inventory search, and putting "red shirt" in the description will give you all the red shirts. The same as putting red on the first line, and then shirt on the second line.

The Like statement allows us to do red%shirt but this would only work if the first word came first.

Apparently the old Clear system did this nicely, so we would like to match it.

Cheers,

Re: Search multiple field on one line

PostPosted: Sat Aug 26, 2017 7:39 pm
by Mike.Sheen
Hi Ernst,

To make this clear, you want to be able to type into a search field in a Jiwa search dialog the following:

Red shirt

And it to return results where the field contains the text Red AND shirt?

Mike

Re: Search multiple field on one line

PostPosted: Fri Sep 08, 2017 10:33 am
by Ernst
Hi Mike,

Yip thats exactly it, We would like to just put in a string of words on the first line, like a google search, and see all the words with AND between them.
Is there a way to change the way the search finds things.

Can think of a number of clients who would find this really usefull.

Thx,

Re: Search multiple field on one line

PostPosted: Thu Sep 21, 2017 11:56 am
by Ernst
Hi Mike,
Any update on if this will be possible?
Thx,

Re: Search multiple field on one line

PostPosted: Thu Sep 21, 2017 6:39 pm
by Mike.Sheen
Ernst wrote:Hi Mike,
Any update on if this will be possible?
Thx,


Sorry, Ernst - haven't had a chance. I'll spend a few minutes on it once 7.1 is released.

Mike

Re: Search multiple field on one line

PostPosted: Fri Sep 22, 2017 12:35 pm
by Ernst
Brilliant Thanks

Re: Search multiple field on one line

PostPosted: Fri Sep 22, 2017 5:07 pm
by Scott.Pearce
I had a quick look at this. It appears to me that it's not possible. *Maybe* via some ugly string manipulation. To that end, I'm going to add some events into the various search functions that will allow a plugin to more easily and robustly hook in and manipulate behaviour. These events will of course be in 7.1 and later.

Re: Search multiple field on one line

PostPosted: Thu Sep 28, 2017 2:46 pm
by perry
Hi Scott,

Do you think using full text search on SQL would work?

select * from vIN_Main_Search
where contains(Description,'"parts*" OR "computer*" )

I would create an index view (avoid changing standard table definitions), then fulltext catalog on the description field.

Re: Search multiple field on one line

PostPosted: Fri Sep 29, 2017 1:16 pm
by Ernst
Description would have to be full text indexed. To use that.
If we could split the search box into 3 using the space between the search words, and have 3 AND Like %Text%, that would work.

But how do we modify the where clause from our plugin?

Re: Search multiple field on one line

PostPosted: Fri Oct 13, 2017 9:56 am
by Ernst
Hi Mike/ Scott,

Now that 7.01 is out, any more thought on this one.

Was looking at viewtopic.php?f=26&t=504&p=1699&hilit=search#p1699

And wondering if it is possible to get the entered field, and build our own "Where" clause.

Thanks,