Uploaded image for project: 'IGB'
  1. IGB
  2. IGBF-2225

Investigate: What exactly gets searched when users use Search Box

    Details

    • Type: Task
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: None
    • Fix Version/s: None
    • Labels:
      None

      Description

      When users search the Cytoscape App Store using the name of an author (e.g., "Scooter") or a word that is contained in an App short description (e.g., "adjacency"), results are returned.

      When users search the IGB App Store with the name of an author (e.g., "loraine") or a word that is contained in an App short description (e.g., "InterPro"), no results are returned.

      It is not clear what the Search feature is actually doing.

      For this task, please do two things:

      • inspect the IGB App Store code and report back: What is actually getting searched?
      • inspect the Cytoscape App Store code and report back: How is search implemented there? Which search tooling are they using - is it still haystack and whoosh?

        Attachments

          Issue Links

            Activity

            Hide
            sameer Sameer Shanbhag (Inactive) added a comment - - edited

            Each and every Model which is Eligible for search has

            1. Search Schema and Search Key which is used by Haystack and Whoosh to do the Searching

            Example
            ```
            search_schema = ('fullname', )
            search_key = 'name'
            ```

            2. The search is carried out on the dields mention in the file apps/search_indexes.py

            ```
            class AppIndex(indexes.SearchIndex, indexes.Indexable):
            text = indexes.EdgeNgramField(document = True, use_template = True)
            Bundle_Name = indexes.CharField(model_attr='Bundle_Name',null=True)

            categories = indexes.MultiValueField(model_attr = 'categories', null=True)

            stars = indexes.IntegerField(model_attr = 'stars',null = True)

            def get_model(self):
            return App

            def prepare_tags(self, obj):
            return [tag.id for tag in obj.categories.all()]
            ```

            3. Search Template can be located at templates/search/indexes/apps/app_text.txt
            This file is responsible to handle the Indexing part of the Search when the app is first added to the search index by Whoosh

            ```
            {{ object.Bundle_Name }}
            {{ object.downloads }}
            {{ object.stars }}

            {% for tag in object.app.categories.all %}

            {{ tag.name }}

            {% endfor %}

            ```

            Searching can be done on more specific fields if we figure out how the search indexing works and then addig it to Releases model rather than Apps model.

            Show
            sameer Sameer Shanbhag (Inactive) added a comment - - edited Each and every Model which is Eligible for search has 1. Search Schema and Search Key which is used by Haystack and Whoosh to do the Searching Example ``` search_schema = ('fullname', ) search_key = 'name' ``` 2. The search is carried out on the dields mention in the file apps/search_indexes.py ``` class AppIndex(indexes.SearchIndex, indexes.Indexable): text = indexes.EdgeNgramField(document = True, use_template = True) Bundle_Name = indexes.CharField(model_attr='Bundle_Name',null=True) categories = indexes.MultiValueField(model_attr = 'categories', null=True) stars = indexes.IntegerField(model_attr = 'stars',null = True) def get_model(self): return App def prepare_tags(self, obj): return [tag.id for tag in obj.categories.all()] ``` 3. Search Template can be located at templates/search/indexes/apps/app_text.txt This file is responsible to handle the Indexing part of the Search when the app is first added to the search index by Whoosh ``` {{ object.Bundle_Name }} {{ object.downloads }} {{ object.stars }} {% for tag in object.app.categories.all %} {{ tag.name }} {% endfor %} ``` Searching can be done on more specific fields if we figure out how the search indexing works and then addig it to Releases model rather than Apps model.

              People

              • Assignee:
                sameer Sameer Shanbhag (Inactive)
                Reporter:
                aloraine Ann Loraine
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: