Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#113 search multiple terms #122

Closed
wants to merge 1 commit into from

Conversation

suprajamannava17
Copy link
Collaborator

Fixes #113

What was changed?

The application components that handle search functionality were updated to support multiple search terms. Specifically, the OrcadashboardComponent.js file was modified to correctly send an array of search terms from the frontend. On the backend, changes were made in usecases/search_orca_data.py to handle the array of search terms and in the extract_sections(file_search_operations.py) function to process and extract data for each search term.

Why was it changed?
The application previously supported only a single search term, which limited its flexibility and efficiency for users working with files containing multiple relevant sections. These changes allow users to input multiple search terms, making the search process more comprehensive and reducing the need for repetitive operations. This improves both usability and functionality.

How was it changed?

  1. Frontend (OrcadashboardComponent.js):
    The searchTermsArray variable is now passed as part of the request payload, ensuring multiple search terms can be sent to the backend.
    Additional data cleanup ensures that sections and other inputs are formatted correctly before sending.

  2. Backend (usecases/search_orca_data.py):

  • usecases/search_orca_data.py
    The search_terms parameter is now retrieved as a list from the input data (data.get('search_terms', [])), preparing the backend to handle multiple terms.
  • extract_sections function:
    The function iterates through all provided search terms, processing each one independently and combining the results into a single output. Adjustments to section logic ensure compatibility with multiple terms while maintaining the functionality for WHOLE, FIRST, LAST, and SPECIFIC sections.

Screenshots that show the changes (if applicable):

Copy link
Collaborator

@SiriChandanaGarimella SiriChandanaGarimella left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please update the changes in the DraftOrcaDashboard.js instead of OrcaDashboardComponent.js? The DraftOrcaDashboard.js contains the new UI changes, and the OrcaDashboardComponent.js will be replaced with the DraftOrcaDashboard.js

@suprajamannava17
Copy link
Collaborator Author

The DraftOrcaDashboard component already handles multiple search terms since searchTerms is initialized as an array.

@bhumulanandinireddy
Copy link
Collaborator

This is done as part of other issue :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add Multiple Search Functionality for Data Extraction
3 participants