Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Ben Norman 167 posts 276 karma points
    Oct 07, 2014 @ 07:18
    Ben Norman
    0

    search terms with double quotes or not

    Hi there, I am trying to find http://www.ahernslawyers.com.au/our-services/contract-advice/legal-advice-on-heads-of-agreements/

    When I search for "heads of agreements" I get a different result to http://www.ahernslawyers.com.au/search/?q=%22heads+of+agreements%22 returns a different result to http://www.ahernslawyers.com.au/search/?q=heads+of+agreements.

    I have just hard coded the double quotes for now but I'm hoping someone knows a less hacky way of doing it.

  • Ismail Mayat 4511 posts 10092 karma points MVP 2x admin c-trib
    Oct 07, 2014 @ 10:31
    Ismail Mayat
    0

    Ben,

    Searching with " gives an error as its a reserved character, in lucene query syntax its used for phrase searches, I usually on my search pages do a quick reg ex on search terms so that it removes any non alphanumerics.  From what I remember in ezSearch when you type in a phrase i.e more than one word it will split terms on space character and do an or search for all the terms found in your case the query will be where content contains legal or advice or heads or agreements (on, of will be ignored as they are english stop words).  

    Regards

    Ismail

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies