You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Something to consider, Standardize Coding Conventions
Ensure consistent naming conventions across the codebase.
Choose and enforce a standard naming convention (preferably snake_case for Python). sometimes it is
GetSNPsByChromosome and sometimes it is search_by_chromosomes
Good Error Messages
Implementation flow idea Scrolling in Elasticsearch:
Scrolling in Elasticsearch allows you to retrieve large numbers of results from a query in multiple batches without the cost of deep pagination. It's suitable for processing large datasets that exceed typical pagination limits.
When a scroll query is initiated, Elasticsearch provides a scroll_id that you use to fetch the next batch of results. This scroll_id acts like a cursor pointing to a specific place in the dataset.
Making scrollId an Optional Parameter:
Modify the endpoint that triggers the scrolling query to accept a scrollId as an optional query parameter.
If a scrollId is provided, the API should continue fetching results from where the last batch ended.
If no scrollId is provided, the API should start a new scroll session and return the initial batch of results along with a new scrollId.
Extending the Snp Class:
Subclass the Snp class to include a property that can return a scrollId associated with a query session.
API and Code Adjustments:
Adjust the API's logic to manage the lifecycle of a scroll session, including the expiration of scrollIds after a certain time (typically 1 minute by default in Elasticsearch, but configurable).
Implement error handling for cases when an expired or invalid scrollId is received.
Some tasks to consider for the remaining time
GetSNPsByChromosome and sometimes it is search_by_chromosomes
Implementation flow idea Scrolling in Elasticsearch:
Scrolling in Elasticsearch allows you to retrieve large numbers of results from a query in multiple batches without the cost of deep pagination. It's suitable for processing large datasets that exceed typical pagination limits.
When a scroll query is initiated, Elasticsearch provides a scroll_id that you use to fetch the next batch of results. This scroll_id acts like a cursor pointing to a specific place in the dataset.
Making scrollId an Optional Parameter:
Extending the Snp Class:
Subclass the Snp class to include a property that can return a scrollId associated with a query session.
API and Code Adjustments:
Adjust the API's logic to manage the lifecycle of a scroll session, including the expiration of scrollIds after a certain time (typically 1 minute by default in Elasticsearch, but configurable).
Implement error handling for cases when an expired or invalid scrollId is received.
tagging @akshala @huaiyumi
The text was updated successfully, but these errors were encountered: