Skip to content

Commit

Permalink
Polish library indexing
Browse files Browse the repository at this point in the history
  • Loading branch information
smathot committed May 9, 2024
1 parent a3a365f commit d8b4a49
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
8 changes: 1 addition & 7 deletions index_library.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,4 @@
import logging; logging.basicConfig(level=logging.INFO, force=True)

if __name__ == '__main__':
# library.load_library(force_reindex=True, exclude_filter=['forum'])
library.load_library(force_reindex=True,
cache_folder='.public-with-forum.db.cache',
exclude_filter=['howtos'])
library.load_library(force_reindex=True,
cache_folder='.public-without-forum.db.cache',
exclude_filter=['howtos', 'forum'])
library.load_library(force_reindex=True, exclude_filter=['forum'])
2 changes: 1 addition & 1 deletion sigmund/library.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def load_library(force_reindex=False, cache_folder=config.db_cache,
if any(f in str(src) for f in exclude_filter):
logger.info(f'skipping json: {src}')
continue
loader = JSONLoader(src, jq_schema='', content_key='content',
loader = JSONLoader(src, jq_schema='.', content_key='content',
json_lines=True,
metadata_func=_extract_metadata)
data += loader.load()
Expand Down

0 comments on commit d8b4a49

Please sign in to comment.