Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

Keyword auto-completions

Help
Idaho_BD
2010-08-12
2013-05-28
  • Idaho_BD
    Idaho_BD
    2010-08-12

    My user is using auto-completions and in the keyword field when she starts typing a common name (scientific name) combination, only the common name is included in the list of auto-completions available. The common name is available and the scientific name is also available in their respective, separate auto-completion lists; however, if the common name is typed & then a paren or even just a space is typed followed by the scientific name, it will NOT  display in the auto-complete list.

    For example, I type the following in the keyword field in a new record:  yellowstone (the auto-complete list appears and Yellowstone cutthroat trout is contained in that list - I select it and it is displayed in the keyword field). Now I type: (Oncorhynchus and the auto-complete list appears but there is nothing even close to what I typed in that list). HOWEVER, if I type: Oncorhynchus by itself (no parens, nothing in front of it) and the _Oncorhynchus clarkii bouvieri _is included in the list. How can I make it see the common name (scientific name) as one entry?

     
  • Irish
    Irish
    2011-06-10

    My user is screaming again about this problem. Did my post just get missed or is this not possible at all?  Is there anything I can do to make this work the way she wants? I may have to junk all these years of work with refbase to go back to her favorite RefManager (yuck!!!). Please, please, please!! Does anyone have a solution for this? Thank you for any help anyone can provide.

     
  • Irish
    Irish
    2011-06-10

    We are trying a few options to get this at least reasonably resolved. We've asked her to just put in the common names into the keywords field. We are then using the UPDATE statement to find those common names and replace them with the common name + the scientific name. She seems to be fine with this since she doesn't have to do more work. We may even try to run a script to make those changes periodically but that will be down the road a bit. If you have any other thoughts, I would be interested to hear them. Thanks.

     
  • The autocompleter we use has regular expressions that parse separate words.  A word is a combination of letters, numbers, and underscores.  It should be theoretically possible to also match punctuation (such as parentheses), but your case is a corner case & it is unlikely that this will be used in the main refbase (as we typically do not want those in the keyword field).

     
  • Irish
    Irish
    2011-06-14

    I'm not sure why you wouldn't want to use this in refbase as it is a common practice to include scientific names in parens after the common name; but whatever. Can you give me an idea of how I can add the parens so they will match? Thanks for whatever help you can provide. If you'd rather send me an email - elliscj@wsu.edu - thanks.

     
  • it is a common practice to include scientific names in parens after the common name

    Sure, but refbase isn't only used for cataloging papers that have biological names.  1% of the records in my 10,000+ (materials science) reference database have parentheses in the keywords field & I don't want completion on them.

    Can you give me an idea of how I can add the parens so they will match?

    Sure.  You need to edit 'opensearch.php'.  Find '$splitPattern'.  You will see an if-elseif-else structure with five-or-so different split patterns.  Remove the parentheses in the final of these.