def METHOD_NAME(
    self,
    METHOD_NAME: VectorStoreQuery,
    **kwargs: Any,
) -> VectorStoreQueryResult:
    """Query index for top k most similar nodes."""
    if METHOD_NAME.filters is not None:
        if "where" in kwargs:
            raise ValueError(
                "Cannot specify filter via both query and kwargs. "
                "Use kwargs only for lancedb specific items that are "
                "not supported via the generic query interface."
            )
        where = _to_lance_filter(METHOD_NAME.filters)
    else:
        where = kwargs.pop("where", None)
    table = self.connection.open_table(self.table_name)
    lance_query = (
        table.search(METHOD_NAME.query_embedding)
        .limit(METHOD_NAME.similarity_top_k)
        .where(where)
        .nprobes(self.nprobes)
    )
    if self.refine_factor is not None:
        lance_query.refine_factor(self.refine_factor)
    results = lance_query.to_df()
    nodes = []
    for _, item in results.iterrows():
        node = TextNode(
            text=item.text,
            id_=item.id,
            relationships={
                NodeRelationship.SOURCE: RelatedNodeInfo(node_id=item.doc_id),
            },
        )
        nodes.append(node)
    return VectorStoreQueryResult(
        nodes=nodes,
        similarities=results["score"].tolist(),
        ids=results["id"].tolist(),
    )