Skip to content

What does understanding code structure and ranking results by relevance actually mean? #35

@m-kru

Description

@m-kru

The cs is described as follows:

CLI code search tool that understands code structure and ranks results by relevance. No indexing required

I did a little test today. I cloned the Linux repository and started searching some text patterns. However, not some random patterns. I was searching texts which represent types, mostly structures, for example, eventfd_ctx.

To be honest, I am a little bit disappointed.

  1. I thought that the tool is "smart" enough to automatically discover type definitions and place them the highest in the results. However, type definitions are buried down in the results, and I still have to manually skim through the results. The tool ranks higher local variables definitions than global type definition.
  2. cs is not aware that the found snippet is a type definition, and it would be nice to extend the printed snippet so that the full definition is displayed. I still have to manually open the file.

These 2 things started me wondering. Maybe I don't understand the idea of cs, and the requirements the tool tries to meet.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions