We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 4370
    • 13 Posts
    Hi and thanks for 1.8.0.
    I am quite interested in effective search in MaxiGallery. So, can you give me any ideas, how to improve it and how to get images as a result, where titles/descriptions/comments/custom fields of these custom images contains searching words?
    Thanks for any help.
      • 5811
      • 1,717 Posts
      @Buzuchok

      Go to AjaxSearch demo site and look at the "with jot and maxigallery" test.
      This test use the ajax mode, but it’s pretty the same thing with the non ajax mode.

      If you have any question or you want clarification or other input, don’t hesitate ...
        • 4370
        • 13 Posts
        Hi. I have some questions.
        First of all, test version of Maxigallery search is simply not what people want to see. =) I understand that Maxigallery uses one document, so results of search are as from one document. If I have Gallery with 20 photos, and every photo have any field with tags or keywords, I want to find only these photos with current keywords, but nothing else. And now I am not sure, is it possible simply to return as a result only these photos, or even is it possible to return any photos from Maxigallery. Can I show images from gallery as a result? The simpliest result of searching I want to have is photos with description/any text contains keywords.
        I understand, that not everything depends on you, but I should be very thankful, if you make possible to create really profitable search according to galleries. Many Thanks.
          • 5811
          • 1,717 Posts
          First of all, test version of Maxigallery search is simply not what people want to see. =)
          You are right. To avoid a search in a test version Maxigallery document simply set the document, not searcheable. The search don’t search in non-searcheable document. In the next version I will add to avoid hidden images from a gallery

          I understand that Maxigallery uses one document, so results of search are as from one document.
          Yes. As tv values or jot comment, for one document you could have n maxigallery images; This a relationship 1-n between document and maxigallery images. In MODx you have a document and linked elements like images, jot comments or TV values.

          With the version 1.8 for each document, all the image titles are concatened to create a concatened field. And the search occurs with this field. Same thing with "descr" field.
          So if you do a search with "cat dog" with &advsearch=`allwords` you will get a gallery document with images with title or description which contains "cat" AND "dog". As the searchword is found in the concatened field gal_title or gal_description, the words could be on several different images. e.g: one image of cat, the other of a dog.
          With version 1.8, the goal of the search is to find a document, not an image.

          This is the same thing with jot comments and TVs.
          - TVs -
          With a TV "Author" containing "Jack London" and another TV "Editor" containing "Penguin press", if you search "london penguin" with &advsearch=`allwords` you need to concatenate all the TV values before to do the search.
          Otherwise you will never find the document linked with these two TVs.
          In the next version I think to limit the concatenation to a specific set of Tvs, I will add a new optional parameter : concatened=`separated list of tv names`. By default all the TVs values will be concatened.

          -JOT-
          Regarding jot, do we search a specific comment or a document which contains comments with the searched words ?
          I think comments should be like TVs. When you search "feedback laptop" with &advearch=`allwords`, you need find a document if these two words are on separate comments.
          In this case the search result display an extract around the searchterm of the concatened comments.


          For Maxigallery, to change the current feature and find an image rather than a document, the easiest way is to work not on concatened field but and native field. So if an image has a title "dog and cat", you get it. And in this case you could with the appropriate placeholder, simply display in your search result template, the name of the document where the image has been found, the image title, the image description and the image.
          With this solution you will get as many search results as images found. Not one document with the images found (if they are in the same gallery).

          So, to summarize, I suggest to use concatened field with jot and tv and single native field with maxigallery.

            • 4370
            • 13 Posts

            you could with the appropriate placeholder, simply display in your search result template, the name of the document where the image has been found, the image title, the image description and the image.
            I suppose, there is no placeholder for image path. Did you mean &config=`image`? Sorry, I can’t implement it. Your wise prompt should be nice append )
              • 5811
              • 1,717 Posts
              I suppose, there is no placeholder for image path.
              For "maxigallery", the fields available are :
              gal_title, gal_descr which are a concatenation of title & descr fields of maxigallery table. So yes, the field "file" is not available with version 1.8.

              Did you mean &config=`image`? Sorry, I can’t implement it.
              Sorry I don’t understand this remark.
                • 4370
                • 13 Posts
                You wrote how to display results: the image title, the image description and the image. How can I display gallery image without imagepath? I tried to add "results with images feature" from your example. But it returns an error.
                  • 5811
                  • 1,717 Posts
                  My previous remarks and explanations was for a search in Maxigallery.

                  In the test "results with images", we don’t search in maxigallery. Simply the images in the search results are not filtered and displayed. You could find the "image.config.php" in the documentation folder or download the file from the demo site (the link is now correct).
                    • 4370
                    • 13 Posts
                    Ok. As for me, everybody who is looking for images, want to see as a result only pictures but nothing else. So, "no pictures - no effect". Anyway, thanks a lot for your answers.
                      • 4370
                      • 13 Posts
                      It’s me again ). What do you think about following solution: We return a concatination of pic Ids, something like "1,3,14" where we found keywords. And then simply display [!MaxiGallery? &pic_query_ids=`1,3,14`!]. If it is not intricate problem, you can give us explanation how to correct php code or something else. I am not very good in php, but may be somebody else could help.
                      TIA