<pre style="word-wrap:break-word;white-space:pre-wrap"><br></pre><div class="gmail_quote">2012/7/2 Vincent Pelletier <span dir="ltr"><<a href="mailto:vincent@nexedi.com" target="_blank">vincent@nexedi.com</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi.<br>
<br>
On Sat, 30 Jun 2012 07:06:01 +0200,<br>
pavel lstiburek <<a href="mailto:plstiburek@gmail.com">plstiburek@gmail.com</a>> wrote :<br>
> first good page:<br>
[...]<br>
<div class="im HOEnZb">> `related_child_address_SearchableText_1_full_text`.`SearchableText`<br>
> LIKE '%praha 7%')<br>
</div><div class="im HOEnZb">[...]<br>
> second bad page:<br>
[...]<br>
</div><div class="im HOEnZb">> AND MATCH<br>
> (`related_child_address_SearchableText_1_full_text`.`SearchableText`)<br>
> AGAINST ('%praha 7%'))<br>
<br>
</div><div class="im HOEnZb">The second request is what is expected in both cases when using the<br>
SearchableText column: being fulltext-indexed, it needs to use<br>
MATCH..AGAINST, not LIKE.<br>
<br>
When using a fulltext field to search for a value, the "%" syntax<br>
doesn't apply anymore. You should search for "praha 7" instead,<br>
preserving the quotes in the searched value.<br>
<br>
Nevertheless, the fact that they are different shows that there is a<br>
bug in ERP5, I'll look into that. Could you give me the output of this<br>
one-liner, so I can check how that column is configured ?<br>
<br>
return repr(context.getPortalObject().portal_catalog.getSQLCatalog().getSearchKey('full_text.SearchableText'))<br>
<br>
</div><div class="HOEnZb"><div class="h5">Regards,<br>
--<br>
Vincent Pelletier<br>
ERP5 - open source ERP/CRM for flexible enterprises<br>
</div></div></blockquote></div><br>result is <span style="white-space:pre-wrap"><Products.ZSQLCatalog.SearchKey.FullTextKey.FullTextKey object at 0x7f5e2cc8cd50></span><div><span style="white-space:pre-wrap"><br></span></div>
<div><span style="white-space:pre-wrap">btw. my friend tells me that on tiolive erp5 site they have in search page set search key Default(Keyword).</span></div><div><span style="white-space:pre-wrap">This may be solution to my problem as well. Is it possible to set this on my erp5?</span> <span style="white-space:pre-wrap"><br>
</span><div><br></div>-- <br>Pavel Lstiburek<br>
</div>