[Yazlist] Extended search on MKWS

biligsaikhan at gmail.com biligsaikhan at gmail.com
Tue Feb 3 08:57:14 UTC 2015


Dear Mike,

Thank you for your prompt reply.
I was reusing MKSW templates
(http://git.indexdata.com/?p=mkws.git;a=tree;f=src/templates;hb=HEAD)
to customize my searchbox.

Thanks again for your advice.

On Tue, Feb 3, 2015 at 5:07 PM, Mike Taylor <mike at indexdata.com> wrote:
> Hi, thanks for getting in touch.
>
> That's actually a really good question -- one that we've not really
> thought about until now.
>
> The present MKWS has no support for multi-part searches -- only the
> single query form that you've seen in all the demos. The good news is
> that this single form understands a rich syntax (CCL -- see
> http://www.indexdata.com/yaz/doc/tools.html#ccl.syntax) so that you
> can do searches like:
>         au=smith and ti=(air or water)
>
> But I'll file an issue to support multi-part search forms in a future release.
>
> --
>
> BTW., your widgets are unnecessarily complex:
>
> <input class="mkws-query mkws-query mkwsQuery mkws-team-{{team}}" size="40"/>
>
> First of all, you never need to repeat a class: so no need for
> "mkws-query mkws-query": once is always enough. (Did you see sample
> code somewhere that looks like this? If so, please let me know where,
> so I can fix it.)
>
> Second, you don't need to include the old-style camelCase version of
> the class-name along with the new-style hyphenated-lower-case version.
> The MKWS code currently still supports the old version, for the
> benefit of any applications out there that use the old names in their
> CSS styling. But you never need them. Finally, you don't need to
> specify a mkws-team-NAME class unless your application uses multiple
> teams.
>
> So all you need in this case is:
>
> <input class="mkws-query" size="40"/>
>
> -- Mike.
>
>
> On 3 February 2015 at 05:19, biligsaikhan at gmail.com
> <biligsaikhan at gmail.com> wrote:
>> Hi List.
>>
>> How do I implement an extended search feature in MKWS? How do I define
>> search fields? How do I set boolean operators?
>>
>> Should I use <input class="mkws-query mkws-query mkwsQuery
>> mkws-team-{{team}}" type="title" size="40"/>
>>
>>  <input class="mkws-query mkws-query mkwsQuery mkws-team-{{team}}"
>> type="author"/> ... etc,
>>
>> IN
>>
>> <form name="mkws-search-form" class="mkws-search-form
>> mkws-team-{{team}}" action="">
>>  <input class="mkws-query mkws-query mkwsQuery mkws-team-{{team}}" type="text"/>
>> <input class="mkws-button mkws-button mkwsButton mkws-team-{{team}}"
>> type="submit" value="{{{mkws-translate "Search"}}}"/>
>> </form>
>>
>> Your advices are appreciated,
>>
>> Best regards,
>>
>> _______________________________________________
>> Yazlist mailing list
>> Yazlist at lists.indexdata.dk
>> http://lists.indexdata.dk/cgi-bin/mailman/listinfo/yazlist
>>



More information about the Yazlist mailing list