0
我有兩個類索賠和索引。我在我的聲明類中有一個名爲topic的字段,它是一個字符串。我嘗試索引不使用數據庫索引列功能的主題列。但它應該通過編碼以下方法。 假設我有權利要求1,對於權利要求1的主題領域(「我愛鬆餅鬆餅」)我會做如下因素治療它索引或標記?
#1. Create an empty Dictionary with "word"=>occurrences
#2. Create a List of the stopwords exemple stopwords = ("For","This".....etc)
#3. Create List of the delimiters exemple delimiter_chars = ",.;:!?"
#4. Split the Text(topic field) into words delimited by whitespace.
#5. Remove unwanted delimiter characters adjoining words.
#6. Remove stopwords.
#7. Remove Duplicate
#8. now i create multiple index object (word="love",occurences = 1,looked = 0,reference on claim 1),(word="muffins",occurences = 2,looked = 0,reference on claim 1),
現在每當我去找爲例鬆餅看着都加字,我會將記錄移到我的數據庫中。所以我的問題是以下是這種方法好嗎?它比數據庫索引功能好嗎?有什麼可以改進的東西嗎?