Skip to content

Enhanced search #393

@tenbob

Description

@tenbob

I wonder if it would be possible to improve the search algorithm on bustimes.org. In some cases it can be a bit tricky to use. Suggestions -

  1. Give more weight to proximity of search terms
  2. Allow quoted strings
  3. Allow wildcards

To illustrate this, say I want to catch a bus from Cambridge Railway Station. If I search for "cambridge railway station" I get a list of 97 services. Most of these go nowhere near Cambridge, making it difficult to find the one I want. For example, service 60 in Glasgow is included because it goes to "Kilbowie, at Cambridge Avenue" and "Greenfield, opposite Shettleston Railway Station".

Ideally the search term should match the name of a single stop rather than fragments of different stops along the line. This might be difficult to implement, but it could be faked by giving a proximity weighting so adjacent words scored more.

The ability to search for a quoted literal string would also be helpful. So by putting quotes around my search terms I could find an exact match. To work reliably, all punctuation and capitalisation would need to be stripped out beforehand.

And finally a wildcard feature would be helpful so I could find the service I wanted by entering "641 brox*" instead of "641 broxbourne".

Do you think that these enhancements might be included? I see from #247 that it may depend on the capabilities of Postgres.

Regards, Bob

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions