Compare commits
No commits in common. "c8s" and "c8-beta" have entirely different histories.
@ -1 +0,0 @@
|
|||||||
1
|
|
||||||
1
.gitignore
vendored
1
.gitignore
vendored
@ -1,2 +1 @@
|
|||||||
SOURCES/Whoosh-2.7.4.tar.gz
|
SOURCES/Whoosh-2.7.4.tar.gz
|
||||||
/Whoosh-2.7.4.tar.gz
|
|
||||||
|
|||||||
1
.python-whoosh.metadata
Normal file
1
.python-whoosh.metadata
Normal file
@ -0,0 +1 @@
|
|||||||
|
415c711099d09fbb6fa4f652575d96c6d7f79f67 SOURCES/Whoosh-2.7.4.tar.gz
|
||||||
@ -1,7 +0,0 @@
|
|||||||
--- !Policy
|
|
||||||
product_versions:
|
|
||||||
- rhel-8
|
|
||||||
decision_context: osci_compose_gate
|
|
||||||
rules:
|
|
||||||
- !PassingTestCaseRule {test_case_name: osci.brew-build.tier0.functional}
|
|
||||||
|
|
||||||
1
sources
1
sources
@ -1 +0,0 @@
|
|||||||
SHA512 (Whoosh-2.7.4.tar.gz) = 7cdefdcf52b704ffe50c00718c42677e2ddfe879f81ad2d14b580b0e026cc0ebb6b9ddc99d8709eaff4eb9b83f654b042c8792821e1ed90aa85cfa6f82845074
|
|
||||||
@ -1,12 +0,0 @@
|
|||||||
environment:
|
|
||||||
PYTHON: /usr/libexec/platform-python
|
|
||||||
|
|
||||||
discover:
|
|
||||||
how: fmf
|
|
||||||
|
|
||||||
execute:
|
|
||||||
how: tmt
|
|
||||||
|
|
||||||
prepare:
|
|
||||||
how: feature
|
|
||||||
crb: enabled
|
|
||||||
@ -1,10 +0,0 @@
|
|||||||
test: |
|
|
||||||
trap cleanup EXIT
|
|
||||||
cleanup(){
|
|
||||||
test -d indexdir && rm -rf indexdir
|
|
||||||
}
|
|
||||||
mkdir indexdir
|
|
||||||
${PYTHON:-python3} quick_start.py
|
|
||||||
|
|
||||||
require:
|
|
||||||
- python3-whoosh
|
|
||||||
@ -1,20 +0,0 @@
|
|||||||
# Based on
|
|
||||||
# https://whoosh.readthedocs.io/en/latest/quickstart.html#a-quick-introduction
|
|
||||||
|
|
||||||
from whoosh.index import create_in
|
|
||||||
from whoosh.fields import *
|
|
||||||
schema = Schema(title=TEXT(stored=True), path=ID(stored=True), content=TEXT)
|
|
||||||
ix = create_in("indexdir", schema)
|
|
||||||
writer = ix.writer()
|
|
||||||
writer.add_document(title=u"First document", path=u"/a",
|
|
||||||
content=u"This is the first document we've added!")
|
|
||||||
writer.add_document(title=u"Second document", path=u"/b",
|
|
||||||
content=u"The second one is even more interesting!")
|
|
||||||
writer.commit()
|
|
||||||
from whoosh.qparser import QueryParser
|
|
||||||
with ix.searcher() as searcher:
|
|
||||||
query = QueryParser("content", ix.schema).parse("first")
|
|
||||||
results = searcher.search(query)
|
|
||||||
result = results[0]
|
|
||||||
|
|
||||||
assert result.get('title') == 'First document'
|
|
||||||
Loading…
Reference in New Issue
Block a user