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

Add a normed options on fields #1001

Closed

Conversation

lpouget
Copy link

@lpouget lpouget commented Mar 29, 2021

Make fieldnorm indexation optional:

  • for all types except text: added a NORMED options
  • for text field:
    • if STRING, field has not fieldnorm retained
    • if TEXT, field has fieldnorm computed

@lpouget lpouget changed the title Add a NORMED options on field Add a normed options on fields Mar 29, 2021
@fulmicoton
Copy link
Collaborator

@lpouget Will review next week. Sorry for having taken so much time!

@fulmicoton fulmicoton self-requested a review May 19, 2021 09:19
src/schema/flags.rs Outdated Show resolved Hide resolved
src/fieldnorm/mod.rs Outdated Show resolved Hide resolved
src/fieldnorm/mod.rs Outdated Show resolved Hide resolved
src/fieldnorm/mod.rs Outdated Show resolved Hide resolved
src/schema/flags.rs Outdated Show resolved Hide resolved
@fulmicoton fulmicoton marked this pull request as ready for review July 21, 2021 00:50
Copy link
Collaborator

@fulmicoton fulmicoton left a comment

Choose a reason for hiding this comment

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

See comments inline.

@fulmicoton fulmicoton force-pushed the main branch 4 times, most recently from 0c60a44 to 9f32b22 Compare August 26, 2021 00:07
Make fieldnorm indexation optional:

* for all types except text => added a NORMED options
* for text field
** if STRING, field has not fieldnorm retained
** if TEXT, field has fieldnorm computed
@fmassot fmassot force-pushed the 922-add-normed-option-on-fields branch from 784c9a4 to bde91de Compare November 29, 2021 21:42
@fmassot
Copy link
Contributor

fmassot commented Nov 30, 2021

I decided to finish it as I think @lpouget has a baby to take care :)
I thought the issue was easy but... I needed to touch many parts of the code and potentially I missed some stuff.
I think the PR is almost ready, I need to add some specific tests when with fields without field norms.

@fulmicoton @PSeitz When you have the time (it's not urgent at all), you can have a look.

@fmassot fmassot force-pushed the 922-add-normed-option-on-fields branch from de3efe1 to 47f3332 Compare November 30, 2021 23:19
src/indexer/merger.rs Outdated Show resolved Hide resolved
src/indexer/merger.rs Outdated Show resolved Hide resolved
src/indexer/segment_writer.rs Outdated Show resolved Hide resolved
src/schema/bytes_options.rs Outdated Show resolved Hide resolved
src/schema/text_options.rs Outdated Show resolved Hide resolved
src/schema/text_options.rs Outdated Show resolved Hide resolved
@fulmicoton
Copy link
Collaborator

@lpouget I will take over that PR and merge it. I hope this is ok with you.

Kanji Yomoda and others added 5 commits December 10, 2021 10:45
* Remove unused sort for segment meta list
* Fix segment meta order dependent test
In addition this PR:
- removes unnecessary flushes and fsyncs on files.
- replace all fsync by fdatasync. The latter triggers
a meta sync if a metadata required to read the file
has changed. It is therefore sufficient for us.

Closes quickwit-oss#1224
Removes the indexed option for facets.
Facets are now always indexed.

Closes quickwit-oss#1195
…1228)

This work by introducing a new API method in the Directory
trait. The user needs to explicitely call this method.
(In particular, once before a commmit)

Closes quickwit-oss#1225
- Using Option for fieldnorm readers.
- Fixing the ratio computer. max_doc and not num_doc.
@codecov-commenter
Copy link

Codecov Report

Merging #1001 (dae66e5) into main (c503c6e) will increase coverage by 0.09%.
The diff coverage is 97.96%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1001      +/-   ##
==========================================
+ Coverage   94.04%   94.14%   +0.09%     
==========================================
  Files         205      206       +1     
  Lines       34525    34806     +281     
==========================================
+ Hits        32470    32767     +297     
+ Misses       2055     2039      -16     
Impacted Files Coverage Δ
src/directory/directory.rs 94.11% <ø> (ø)
src/fastfield/multivalued/mod.rs 96.96% <ø> (ø)
src/schema/flags.rs 56.25% <ø> (ø)
src/schema/text_options.rs 95.12% <50.00%> (-4.88%) ⬇️
src/indexer/index_writer.rs 97.58% <80.00%> (-0.09%) ⬇️
src/schema/schema.rs 97.92% <81.25%> (-0.48%) ⬇️
src/directory/mmap_directory.rs 90.81% <90.90%> (+0.32%) ⬆️
src/indexer/merger.rs 98.89% <97.05%> (-0.05%) ⬇️
src/collector/facet_collector.rs 98.28% <100.00%> (ø)
src/core/index_meta.rs 92.89% <100.00%> (ø)
... and 50 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c503c6e...dae66e5. Read the comment docs.

@fulmicoton
Copy link
Collaborator

This PR was merged as branch issue/922b

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

Successfully merging this pull request may close these issues.

Make it possible to index a field without fieldnorms
5 participants