Changeset View
Changeset View
Standalone View
Standalone View
autotests/integration/querytest.cpp
Show First 20 Lines • Show All 61 Lines • ▼ Show 20 Line(s) | 58 | private: | |||
---|---|---|---|---|---|
62 | void insertDocuments(Transaction* tr); | 62 | void insertDocuments(Transaction* tr); | ||
63 | void addDocument(Transaction* tr,const QString& text, quint64 id, const QString& url) | 63 | void addDocument(Transaction* tr,const QString& text, quint64 id, const QString& url) | ||
64 | { | 64 | { | ||
65 | Document doc; | 65 | Document doc; | ||
66 | doc.setUrl(QFile::encodeName(url)); | 66 | doc.setUrl(QFile::encodeName(url)); | ||
67 | 67 | | |||
68 | QString fileName = url.mid(url.lastIndexOf('/') + 1); | 68 | QString fileName = url.mid(url.lastIndexOf('/') + 1); | ||
69 | 69 | | |||
70 | TermGenerator tg(&doc); | 70 | TermGenerator tg(doc); | ||
71 | tg.indexText(text); | 71 | tg.indexText(text); | ||
72 | tg.indexFileNameText(fileName); | 72 | tg.indexFileNameText(fileName); | ||
73 | doc.setId(id); | 73 | doc.setId(id); | ||
74 | doc.setMTime(1); | 74 | doc.setMTime(1); | ||
75 | doc.setCTime(2); | 75 | doc.setCTime(2); | ||
76 | 76 | | |||
77 | tr->addDocument(doc); | 77 | tr->addDocument(doc); | ||
78 | } | 78 | } | ||
▲ Show 20 Lines • Show All 90 Lines • Show Last 20 Lines |