Dear villas,

You said:


I suppose that my proposal to use shlex would really apply to Peter's 
> suggestion.  
>
> I guess it might also be considered for use in the build_query function of 
> sqlhtml.py.
>
> Shlex seems like a great way of using quotes to contain search phrases.  I 
> guess Google would be using something similar,  and I'm sure that many of 
> us use that feature all the time.
>
>
I think you're right on all accounts. Maybe you should post an 
"Enhancement" request to  Issues-web2py 
<https://code.google.com/p/web2py/issues/list> for "the build_query 
function of sqlhtml.py".

Love and peace,

Joe


On Monday, July 21, 2014 8:25:24 AM UTC-7, villas wrote:
>
> Hi Joe,
>
> I suppose that my proposal to use shlex would really apply to Peter's 
> suggestion.  
>
> I guess it might also be considered for use in the build_query function of 
> sqlhtml.py.
>
> Shlex seems like a great way of using quotes to contain search phrases.  I 
> guess Google would be using something similar,  and I'm sure that many of 
> us use that feature all the time.
>
>
>
> On Monday, 14 July 2014 17:54:27 UTC+1, JoeCodeswell wrote:
>>
>> Dear villas,
>>
>> Thanks for the reply.
>>
>> Here is my understanding of what you want. You'd like to be able to 
>> search using a search syntax based on the shlex module.
>>
>> My technique uses the SQLFORM.grid's Standard Search Input 
>> ("#w2p_keywords") syntax for it's searches.
>>
>> I suggest you post an Enhancment suggestion for the SQLFORM.grid's 
>> Standard Search Input as a main discussion topic in this forum.
>>
>> Thanks again, villas.
>>
>> Love and peace,
>>
>> Joe
>>
>> On Saturday, July 12, 2014 10:39:31 AM UTC-7, villas wrote:
>>>
>>> I would also like to add an optional 'extra' because it is nice to be 
>>> able to search like this:
>>>
>>>     search_text = '"David Cameron" uk' 
>>>
>>> By quoting search 'phrases' as well as words,  you can get a better 
>>> result.  After all,  I would not want every David in the UK to be listed.
>>>
>>> I have found that using 'shlex' is a good solution.  For example:
>>>
>>>     import shlex 
>>>     words = [x for x in shlex.split(search_text)] if search_text else []
>>>
>>> I hope this might also be useful to someone wishing to improve their 
>>> search options.
>>>
>>> D
>>>
>>>
>>>
>>>
>>> On Friday, 11 July 2014 00:20:39 UTC+1, peter wrote:
>>>>
>>>> Thanks for this Joe, and it is an interesting approach. However I find 
>>>> the approach I used
>>>>
>>>>
>>>> https://groups.google.com/forum/#!searchin/web2py/sqlform.grid$20search/web2py/9_1ECdKHKUo/8OISg7o8OVIJ
>>>>
>>>> Somewhat easier to understand. Your approach is more novel however. 
>>>>
>>>> Peter
>>>>
>>>
On Monday, July 21, 2014 8:25:24 AM UTC-7, villas wrote:
>
> Hi Joe,
>
> I suppose that my proposal to use shlex would really apply to Peter's 
> suggestion.  
>
> I guess it might also be considered for use in the build_query function of 
> sqlhtml.py.
>
> Shlex seems like a great way of using quotes to contain search phrases.  I 
> guess Google would be using something similar,  and I'm sure that many of 
> us use that feature all the time.
>
>
>
> On Monday, 14 July 2014 17:54:27 UTC+1, JoeCodeswell wrote:
>>
>> Dear villas,
>>
>> Thanks for the reply.
>>
>> Here is my understanding of what you want. You'd like to be able to 
>> search using a search syntax based on the shlex module.
>>
>> My technique uses the SQLFORM.grid's Standard Search Input 
>> ("#w2p_keywords") syntax for it's searches.
>>
>> I suggest you post an Enhancment suggestion for the SQLFORM.grid's 
>> Standard Search Input as a main discussion topic in this forum.
>>
>> Thanks again, villas.
>>
>> Love and peace,
>>
>> Joe
>>
>> On Saturday, July 12, 2014 10:39:31 AM UTC-7, villas wrote:
>>>
>>> I would also like to add an optional 'extra' because it is nice to be 
>>> able to search like this:
>>>
>>>     search_text = '"David Cameron" uk' 
>>>
>>> By quoting search 'phrases' as well as words,  you can get a better 
>>> result.  After all,  I would not want every David in the UK to be listed.
>>>
>>> I have found that using 'shlex' is a good solution.  For example:
>>>
>>>     import shlex 
>>>     words = [x for x in shlex.split(search_text)] if search_text else []
>>>
>>> I hope this might also be useful to someone wishing to improve their 
>>> search options.
>>>
>>> D
>>>
>>>
>>>
>>>
>>> On Friday, 11 July 2014 00:20:39 UTC+1, peter wrote:
>>>>
>>>> Thanks for this Joe, and it is an interesting approach. However I find 
>>>> the approach I used
>>>>
>>>>
>>>> https://groups.google.com/forum/#!searchin/web2py/sqlform.grid$20search/web2py/9_1ECdKHKUo/8OISg7o8OVIJ
>>>>
>>>> Somewhat easier to understand. Your approach is more novel however. 
>>>>
>>>> Peter
>>>>
>>>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to