ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Any good documents or guides on using the EE search facility

June 30, 2011 4:59pm

Subscribe [4]
  • #1 / Jun 30, 2011 4:59pm

    buggles

    32 posts

    The standard documentation is weak, and I find myself making assumptions I just can’t verify with testing. For example, if I set it to search entries I would assume it would search all entry fields that are marked as searchable?

    If so, how does it deal with custom fields?

    Another section of EE that could do with less documentation about what to type (that’s the easy bit) and more illustration of how it is designed to work.

    Thanks in advance.

  • #2 / Jul 01, 2011 2:13am

    John Henry Donovan

    12339 posts

    buggles,

    If so, how does it deal with custom fields?

    For example, if I set it to search entries I would assume it would search all entry fields that are marked as searchable?

    It will search any custom field related to an entry that is marked as searchable.

    Entry fields are essentially custom fields. They are the same.

    Does that help?

    If you are continuing to have issues can you put it into context with an example of what is not working for you please and we can try and work with you on it?

  • #3 / Jul 01, 2011 3:55am

    buggles

    32 posts

    Hi there,

    Thank you for the response. So, it’s not even finding things in titles. I have an entry:

    This is a test entry

    With a custom field (Espresso) that has a large amount of text in it in general. When I search for test, it doesn’t find the entry entitled “this is a test entry” but it does find other entries that just have test in them as parts of other words (such as latest for example). It’s not finding things in entries with custom fields.

    I feel like I must be doing something wrong, but just don’t feel like the documentation does much to lay out how it’s designed to work. I’m loathe to write my own solution, but at the moment I may do that simply because I can’t fathom what the standard functionality wants me to do or what its limitations are.

    I’m sorry I can’t give much more detail, but really, I haven’t even been able to identify what’s happening vs. what’s supposed to happen in the case above. To quote douglas adams….

    Here I am, brain the size of a planet, and I’ve spent two days trying to figure out ExpressionEngine search*

    *some words were changed in order to get a laugh.

  • #4 / Jul 01, 2011 4:05am

    vosSavant

    380 posts

    buggles,

    If you just do a search for “42” in the documentation, I think you’ll find what you’re after 😉

  • #5 / Jul 01, 2011 5:25am

    narration

    773 posts

    bad, bad vos Savant 😉 ‘our Scholar’ indeed…

    buggles, if it’s not finding a word in titles, this is not normal, as titles are _always_ searched, whatever your settings. And that does work here, on 2.1.1.

    Here’s the documentation for search_in, which is the controlling parameter unless you are using a similar form control or field of the same name.

    I presume you’re testing on single words at first, since there are rules for how to handle multiple ones (also in these documented parameters).

    As well, is this posting you’re trying to find not with Open status, or is it expired or not yet published, etc.? Those are likely to be reasons it’s skipped.


    I notice you haven’t mentioned what version you’re running. Some earlier versions this year were missing some of the ability to obey codes like this, but still, you should be finding in titles - I don’t think those problems are involved here.


    Hope that gets you on a good road, buggles.

    Regards,
    Clive

  • #6 / Jul 01, 2011 8:54am

    buggles

    32 posts

    LOVE the 42 suggestion 😊

    I’m running 2.1.3 and these are thing’s I’ve eliminated so far as “could be me doing it wrong”.

    1. I’m searching in the right channel. I get results from that channel, they don’t meet expectations
    2. I’m actually explicitly setting the status’s and getting results from the expected ones… it’s just the actual results that don’t meet expectations. The status of the entries are confirmed as being in the “status” parameter
    3. They are not future or expired
    4. I’m matching against “any” and “entries” I believe this is right.

    Anything else you can think of that I could eliminate would be awesomeness.

  • #7 / Jul 01, 2011 3:07pm

    narration

    773 posts

    Hmm. And on the Douglas Adams front, I had actually yesterday, and long before seeing any of this, been musing for some moments over his (in)famous adventure game, Starship Titanic. There, it’s all about the chicken, or rather at a certain point. There are a lot of other points….

    Ok. Search. It should work for what you are trying, certainly. Test is not a stop-word, checked that and checked that I could find such a title. It shouldn’t require any of the fixes that were done, though likely you’d be best these days to upgrade to 2.2.1.

    —The one thing you didn’t answer back on was if you were trying to use multi-word searches. If you did, you probably want to try parameter where=“all”, just to see that you can find that way, whatever your later intents with it may be.

    —I seem to recall that search isn’t successful often with two-letter searches; something about the algorithm and probably tied to efficient algorithms that use digrams or trigrams,  and likely buried in PHP rather than EE.

    —the only other thing I can suggest is to look and see whether you have hidden or visible form elements setting search parameters, besides any parameters you put in the search tag.

    —you might find it useful to be aware that: 1) simple_form search is actually pretty much the same as advanced_form search, in that all the parameters are active if you set them, thus needing to be sure what is set 2) a number of the search parameters simply didn’t function around 2.1.3 or so, and we got that fixed, while there are patches you can find for some of them.

    However, search itself mostly did work, just couldn’t be controlled in detail, as some people found. I think you would still be finding a single word in a title, as that’s always enabled by default.

    Beyond this, not quite sure what there is to say, but there is a restaurant….

    Best to both, and good fortune, buggles,
    Clive

  • #8 / Jul 03, 2011 7:10am

    buggles

    32 posts

    Using the simple search form worked. In fact what I did was create a “normal” form in a template which captured the parameters I wanted and on post I knocked up a little extension that put the variables into globals and then used them as parameters to the simple search tag.

    Sadly, I can’t upgrade to 2.2.X yet, there is a show stopping MSM bug (single login no longer works, they have to log into each MSM site individually despite the fact they are all using the same cookie .domain.com regardless of the MSM’s sub-domain).

    Thank you very much for your help, I would rather have made the advanced search form dance… but your proposal appealed to my love of Occam’s razor.

  • #9 / Jul 03, 2011 12:02pm

    narration

    773 posts

    William of Occam was pretty insightful, wasn’t he. Without him, any amount of Sherlock Holmes stories probably would never have appeared for enjoyment.

    Very glad you got this going, buggles, and sounds smart all around. I don’t know about the MSM territory; presumably they’ll get that fixed when they come back from the US cousin of Guy Fawkes night.

    They’ve been knocking bugs down at a terrific clip once 2.2 was launched, with key developers on the forum too, so be sure you keep the conversation up about what you want.

    Regards and a tip of the hat in the general direction of Douglas Adams’ departure stars,
    Clive

  • #10 / Jul 07, 2011 2:13pm

    Kyle Cotter

    730 posts

    Glad you got everything sorted out buggles. Please post again as needed.

    And thanks Narration for lending a hand here! 😊

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases