Details

    • Type: Task Task
    • Status: Ready for Work
    • Priority: TBD TBD
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Labels:
    • Complexity:
      Undetermined

      Description

      Define how different users will use the search box – should there be any special syntax?

      Some examples:

      • should the search 'Blood Pressure' search as two individual words or as a phrase?
      • should we understand AND / OR within the search box?
      • should we have " " indicate that the search entry should search as a phrase (as with google)?
      • If the user searches for 36 should this also return 36.2?
      • Should there be a way to preselect filters using the search box? For example obs:blood would only search observations for blood?
      • Should we support wildcard (**) in searches? What would this look like more specifically?
      • Support searching parts of words?

      Google search operators for reference: https://support.google.com/websearch/answer/136861?hl=en

        Gliffy Diagrams

          Activity

          Hide
          Kaweesi Joseph added a comment -

          Thanks, i will soon test this out

          Show
          Kaweesi Joseph added a comment - Thanks, i will soon test this out
          Hide
          Kaweesi Joseph added a comment -

          Looks like the first fix i made this ticket is not so effective; mainly one that goes like: concept_synonym:"Temp (C)"
          Let me how i can revisit this summer

          Show
          Kaweesi Joseph added a comment - Looks like the first fix i made this ticket is not so effective; mainly one that goes like: concept_synonym:"Temp (C)" Let me how i can revisit this summer
          Hide
          Kaweesi Joseph added a comment -

          Sorry, Seems to work. The task will be investigation to clear any bugs if there be any! and may be adopt Jonathan Cummins's regex expression

          Show
          Kaweesi Joseph added a comment - Sorry, Seems to work. The task will be investigation to clear any bugs if there be any! and may be adopt Jonathan Cummins 's regex expression
          Hide
          Kaweesi Joseph added a comment -

          I have just tested Jonathan Cummins's Regex and it works pretty fine, however if you noticed that; 'fieldName:\"blood pressure\"' translates into '(fieldName OR fieldName):"blood pressure"'* instead of 'fieldName:"blood pressure"' which is a bug your team would be interested to work on. For now my working algorithm, doesn't break down a phrase that contains : character and i hope to either support that or switch to your algorithm and fix the bug if not fixed by then.

          I have added your Regular expression to master at: 7105e5f

          Show
          Kaweesi Joseph added a comment - I have just tested Jonathan Cummins 's Regex and it works pretty fine, however if you noticed that; 'fieldName:\"blood pressure\"' translates into '(fieldName OR fieldName ):"blood pressure"'* instead of 'fieldName:"blood pressure"' which is a bug your team would be interested to work on. For now my working algorithm, doesn't break down a phrase that contains : character and i hope to either support that or switch to your algorithm and fix the bug if not fixed by then. I have added your Regular expression to master at: 7105e5f
          Hide
          Jonathan Cummins added a comment -

          Yep, it won't work quite right if you're including a field name. For chart search inside g3, you don't include a field name (all the text you need to search is copied to one field in solr) so I never had to worry about that part. You should be able to make it work by pulling out each fieldName and fieldValue, parsing the fieldValue, and then sticking it back on the field name.

          I would do it like this (you might have a better way)...

          1. Look for the :.
          2. The left side is the fieldName, everything until the end of the string or the next fieldName is the fieldValue
          3. Parse the fieldValue.
          4. Stick it back together with the field name.

          This way, if somebody puts in:
          fieldName1:blood pressure fieldName2:"blood pressure" fieldName3:blood, pressure

          You'd wind up with:
          fieldName1:((blood OR blood*) AND (pressure OR pressure*)) fieldName2\:"blood pressure" fieldName3:((blood OR blood*) OR (pressure OR pressure*))

          So, like you can parse the values you search for and then stick them on the fields you're looking for. You might even want to parse differently depending on the field you're searching. Like if one of the fields is a category or date, you might want to do something completely different.

          Anyway, that's just what popped into my head. Maybe it'll help, but maybe not! haha

          Show
          Jonathan Cummins added a comment - Yep, it won't work quite right if you're including a field name. For chart search inside g3, you don't include a field name (all the text you need to search is copied to one field in solr) so I never had to worry about that part. You should be able to make it work by pulling out each fieldName and fieldValue, parsing the fieldValue, and then sticking it back on the field name. I would do it like this (you might have a better way)... Look for the : . The left side is the fieldName , everything until the end of the string or the next fieldName is the fieldValue Parse the fieldValue . Stick it back together with the field name. This way, if somebody puts in: fieldName1:blood pressure fieldName2:"blood pressure" fieldName3:blood, pressure You'd wind up with: fieldName1:((blood OR blood*) AND (pressure OR pressure*)) fieldName2\:"blood pressure" fieldName3:((blood OR blood*) OR (pressure OR pressure*)) So, like you can parse the values you search for and then stick them on the fields you're looking for. You might even want to parse differently depending on the field you're searching. Like if one of the fields is a category or date, you might want to do something completely different. Anyway, that's just what popped into my head. Maybe it'll help, but maybe not! haha

            People

            • Assignee:
              Unassigned
              Reporter:
              Tobin Greensweig
            • Votes:
              0 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

              • Created:
                Updated:

                Time Tracking

                Estimated:
                Original Estimate - 2 weeks
                2w
                Remaining:
                Time Spent - 1 week Remaining Estimate - 1 week
                1w
                Logged:
                Time Spent - 1 week Remaining Estimate - 1 week
                1w

                  Development