Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: redis/redis-vl-python
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: main
Choose a base ref
...
head repository: redis/redis-vl-python
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: bsb/issue-360
Choose a head ref
  • 1 commit
  • 3 files changed
  • 1 contributor

Commits on Sep 24, 2025

  1. feat: add text field weights support to TextQuery (#360)

    Adds the ability to specify weights for text fields in RedisVL queries,
    enabling users to prioritize certain fields over others in search results.
    
    - Support dictionary of field:weight mappings in TextQuery constructor
    - Maintain backward compatibility with single string field names
    - Add set_field_weights() method for dynamic weight updates
    - Generate proper Redis query syntax with weight modifiers
    - Comprehensive validation for positive numeric weights
    
    Example usage:
    ```python
    # Single field with weight
    query = TextQuery(text="search", text_field_name={"title": 5.0})
    
    # Multiple fields with weights
    query = TextQuery(
        text="search",
        text_field_name={"title": 3.0, "content": 1.5, "tags": 1.0}
    )
    ```
    bsbodden committed Sep 24, 2025
    Configuration menu
    Copy the full SHA
    1b98123 View commit details
    Browse the repository at this point in the history
Loading