{"id":459,"date":"2015-10-23T01:12:10","date_gmt":"2015-10-22T22:12:10","guid":{"rendered":"https:\/\/gokhan-gokalp.com\/?p=459"},"modified":"2019-05-16T09:09:03","modified_gmt":"2019-05-16T06:09:03","slug":"lucene-net-search-engine-kutuphanesi-kullanimi","status":"publish","type":"post","link":"https:\/\/gokhan-gokalp.com\/tr\/lucene-net-search-engine-kutuphanesi-kullanimi\/","title":{"rendered":"Lucene.Net Search Engine K\u00fct\u00fcphanesi Kullan\u0131m\u0131"},"content":{"rendered":"<p>Merhaba arkada\u015flar, uzun bir aradan sonra kar\u015f\u0131n\u0131za g\u00fczel bir k\u00fct\u00fcphane incelemesi ile geliyorum.<\/p>\n<p>G\u00fcn\u00fcm\u00fczde yayg\u0131nla\u015fan teknoloji ile art\u0131k ciddi anlamda b\u00fcy\u00fck boyutlu veriler ile \u00e7al\u0131\u015fmaktay\u0131z. Zaman zaman bir e-ticaret projesindeki \u00fcr\u00fcnlerin \u00e7oklu\u011funu d\u00fc\u015f\u00fcn\u00fcn veya bir sosyal platform sitesini. \u00d6z\u00fcnde geli\u015ftirmi\u015f oldu\u011fumuz uygulamalarda hepimiz <strong>search<\/strong> i\u015flemi yapma ihtiyac\u0131 duymaktay\u0131z.<\/p>\n<p>E\u011fer geli\u015ftirmi\u015f oldu\u011fumuz uygulamada verimizin boyutu ciddi anlamda b\u00fcy\u00fck de\u011filse bunu bir \u015fekilde filtreli sql sorgular\u0131 ile halledebiliyoruz. Veri boyutumuz dahada b\u00fcy\u00fcmeye ba\u015flad\u0131\u011f\u0131nda ise performans \u00e7al\u0131\u015fmalar\u0131 ad\u0131 alt\u0131nda dahada filtrelenerek git gide kompleks sql sorgular\u0131na ve bir zaman sonra bir \u00e7\u0131kmaza do\u011fru gidiyoruz. :)<\/p>\n<p>\u015eu sorguyu bir d\u00fc\u015f\u00fcn\u00fcn:<\/p>\n<pre class=\"lang:c# decode:true\">SELECT * FROM Product WHERE Name LIKE '%blabla%'<\/pre>\n<p>E\u011fer veri boyutumuz ciddi anlamda b\u00fcy\u00fck ise (\u00f6rne\u011fin 20.000+ veya daha az yada \u00e7ok) istedi\u011fimiz kadar <strong>Name<\/strong> alan\u0131na index versekte\u00a0veya farkl\u0131 <strong>WHERE<\/strong> kriterleride taksak, g\u00fcn\u00fcm\u00fcz h\u0131z teknolojisinde\u00a0<strong>response time olarak geri kalaca\u011f\u0131z<\/strong>. \u00d6zellikle k\u00fcreselle\u015fen rekabet ortam\u0131nda herkes daha iyisini ve daha h\u0131zl\u0131s\u0131n\u0131 yapmaya \u00e7al\u0131\u015f\u0131yorken.<\/p>\n<p>\u0130\u015fte bu gibi durumlarda imdad\u0131m\u0131za \u00e7ok g\u00fczel bir search engine k\u00fct\u00fcphanesi olan <em>Lucene<\/em> gibi yap\u0131lar ko\u015fuyor.<\/p>\n<h2>Lucene Nedir?<\/h2>\n<p>En saf hali ile <em>Apache Lucene<\/em> projesi kapsam\u0131nda olan\u00a0<strong>full-text search engine<\/strong> diyebiliriz.<\/p>\n<p>G\u00fcn\u00fcm\u00fcz teknolojisinde gayet pop\u00fclerli\u011fini koruyan search engine&#8217;ler aras\u0131ndaki <strong>Elastic Search<\/strong> ve <strong>Solr<\/strong>&#8216;nin alt yap\u0131s\u0131n\u0131 olu\u015fturmaktad\u0131r. Lucene temelinde <em>Java<\/em> ile geli\u015ftirilmi\u015ftir ve <em>.NET<\/em> versiyonu ile de .<em>NET<\/em> kullan\u0131c\u0131lar\u0131n\u0131nda kullan\u0131m\u0131na sunulmu\u015ftur.<\/p>\n<h3>\u00c7al\u0131\u015fma Mant\u0131\u011f\u0131\u00a0\u0130se:<\/h3>\n<p>Indexlenecek olan veri g\u00f6nderilir ve <em>Lucene<\/em> taraf\u0131ndan dosya sistemi \u00fczerinde indexlenir. Arama i\u015flemi yapaca\u011f\u0131m\u0131z zaman ise indexlemi\u015f oldu\u011fu dosya sistemi \u00fczerinde arama yapar\u00a0ve istenildi\u011fi kadar alan \u00fczerinde de indexlemeye olanak sa\u011flamaktad\u0131r.<\/p>\n<p><em>RDBMS<\/em>&#8216;lerdeki full-text search i\u015flemlerinden daha performansl\u0131 bir sonu\u00e7 g\u00f6stermektedir. (Yapacak oldu\u011fumuz \u00f6rnek uygulama \u00fczerinde de inceliyor olaca\u011f\u0131z.)<\/p>\n<p>\u00c7ok b\u00fcy\u00fck veriler \u00fczerinde <strong>full-text search<\/strong>\u00a0i\u015flemi yapacaksak isek, ger\u00e7ekten harika bir k\u00fct\u00fcphanedir. Di\u011fer yandan\u00a0indexlemek istedi\u011fimiz i\u00e7eri\u011fin\u00a0path&#8217;ini vererek, indexleme i\u015flemini\u00a0Lucene&#8217;e yapt\u0131rabiliyoruz.<\/p>\n<p><em>Visual Studio<\/em>&#8216;mu a\u00e7\u0131p hemen\u00a0<strong>LuceneSearchEngine<\/strong> isminde yeni bir konsol uygulamas\u0131 olu\u015ftural\u0131m. Olu\u015fturmu\u015f oldu\u011fumuz konsol uygulamas\u0131na <em>NuGet Package Manager<\/em> \u00fczerinden <strong>Lucene.Net<\/strong>&#8216;i bulup projeye dahil edelim.<\/p>\n<p><a href=\"\/wp-content\/uploads\/2015\/10\/lucene1.jpg\"><img decoding=\"async\" class=\"aligncenter size-full wp-image-470 lazyload\" data-src=\"\/wp-content\/uploads\/2015\/10\/lucene1.jpg\" alt=\"lucene1\" width=\"889\" height=\"364\" data-srcset=\"https:\/\/gokhan-gokalp.com\/wp-content\/uploads\/2015\/10\/lucene1.jpg 889w, https:\/\/gokhan-gokalp.com\/wp-content\/uploads\/2015\/10\/lucene1-300x123.jpg 300w\" data-sizes=\"(max-width: 889px) 100vw, 889px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 889px; --smush-placeholder-aspect-ratio: 889\/364;\" \/><\/a><\/p>\n<p>Referanslar\u0131 dahil ettikten sonra \u00f6rne\u011fimizde kullanaca\u011f\u0131m\u0131z\u00a0<strong>Product<\/strong> class&#8217;\u0131n\u0131, <strong>Entities<\/strong> klas\u00f6r\u00fc i\u00e7erisinde olu\u015fturuyorum.<\/p>\n<pre class=\"lang:default decode:true\">namespace LuceneSearchEngine.Entities\r\n{\r\n    public class Product\r\n    {\r\n        public int Id { get; set; }\r\n        public string Name { get; set; }\r\n    }\r\n}<\/pre>\n<p>\u015eimdi s\u0131ra geldi search engine ile ilgili gerekli business&#8217;\u0131 bar\u0131nd\u0131r\u0131cak olan\u00a0<strong>LuceneEngine<\/strong> class&#8217;\u0131n\u0131 olu\u015fturmaya. \u0130lk k\u0131s\u0131mda sizlere en basit haliyle ilgili entity&#8217;lerimizi,\u00a0<em>Lucene<\/em> ile nas\u0131l indexleyebiliriz&#8217;i g\u00f6stermek istiyorum. Dilerseniz incelemeye ba\u015flayal\u0131m.<\/p>\n<pre class=\"lang:c# decode:true\">using Lucene.Net.Analysis;\r\nusing Lucene.Net.Analysis.Standard;\r\nusing Lucene.Net.Documents;\r\nusing Lucene.Net.Index;\r\nusing Lucene.Net.QueryParsers;\r\nusing Lucene.Net.Search;\r\nusing Lucene.Net.Store;\r\nusing LuceneSearchEngine.Entities;\r\nusing System.Collections.Generic;\r\nusing System.Linq;\r\n\r\nnamespace LuceneSearchEngine\r\n{\r\n    public class LuceneEngine\r\n    {\r\n        private Analyzer _Analyzer;\r\n        private Directory _Directory;\r\n        private IndexWriter _IndexWriter;\r\n        private IndexSearcher _IndexSearcher;\r\n        private Document _Document;\r\n        private QueryParser _QueryParser;\r\n        private Query _Query;\r\n        private string _IndexPath = @\"C:\\LuceneIndex\";\r\n\r\n        public LuceneEngine()\r\n        {\r\n            _Analyzer = new StandardAnalyzer(Lucene.Net.Util.Version.LUCENE_30);\r\n            _Directory = FSDirectory.Open(_IndexPath);\r\n        }\r\n\r\n        public void AddToIndex(IEnumerable values)\r\n        {\r\n            using (_IndexWriter = new IndexWriter(_Directory, _Analyzer, IndexWriter.MaxFieldLength.UNLIMITED))\r\n            {\r\n                foreach (var loopEntity in values)\r\n                {\r\n                    _Document = new Document();\r\n\r\n                    foreach (var loopProperty in loopEntity.GetType().GetProperties())\r\n                    {\r\n                        \/\/ Dilersek indexlenmesini istemedi\u011fimiz bir alan varsa, kontrol ederek Field.Index.NO vermemiz yeterli olacakt\u0131r.\r\n                        _Document.Add(new Field(loopProperty.Name, loopProperty.GetValue(loopEntity).ToString(), Field.Store.YES, Field.Index.ANALYZED));\r\n                    }\r\n                    \r\n                    _IndexWriter.AddDocument(_Document);\r\n                    _IndexWriter.Optimize();\r\n                    _IndexWriter.Commit();\r\n                }\r\n            }\r\n        }\r\n    }\r\n}<\/pre>\n<p><strong>AddToIndex<\/strong> metot&#8217;u ile parametre olarak IEnumerable olarak Product entity&#8217;lerimizi al\u0131yoruz. <strong>IndexWriter<\/strong> objesine ise parametrelerinde hangi path&#8217;e indexleyece\u011fi bilgisini Directory objesi ile veriyoruz ve ard\u0131ndan constructor&#8217;da olu\u015fturmu\u015f oldu\u011fumuz analyzer tipini veriyoruz. Son olarak limitsiz field uzunlu\u011funu ilgili enum \u00fczerinden set ediyoruz.<\/p>\n<p>Constructor&#8217;da initialize etti\u011fimiz\u00a0<strong>analyzer<\/strong> ve <strong>filtrelerini<\/strong> inceleyelim.<\/p>\n<table width=\"782\">\n<tbody>\n<tr>\n<td width=\"154\"><strong>ANALYZER<\/strong><\/td>\n<td width=\"628\"><strong>A\u00c7IKLAMA<\/strong><\/td>\n<\/tr>\n<tr>\n<td width=\"154\">StandardAnalyzer<\/td>\n<td width=\"628\">\u0130ngilizce duraksatma kelimelerini kullanarak StandardTokenizer filtreleri ile StandardFilter, LowerCaseFilter ve StopFilter&#8217;\u0131 kapsamaktad\u0131r.<\/td>\n<\/tr>\n<tr>\n<td width=\"154\">KeywordAnalyzer<\/td>\n<td width=\"628\">\u0130sminden de anla\u015f\u0131laca\u011f\u0131 \u00fczere gelen token&#8217;\u0131 yani keyword&#8217;\u00fc tamam\u0131n\u0131 herhangi bir par\u00e7aya ay\u0131rmadan kullanmaya yarar. \u00d6rne\u011fin belli \u00fcr\u00fcn isimlerinde aramada veya posta kodlar\u0131 aramalar\u0131nda.<\/td>\n<\/tr>\n<tr>\n<td width=\"154\">WhitespaceAnalyzer<\/td>\n<td width=\"628\">WhitespaceTokenizer&#8217;\u0131 kullan\u0131r ve text&#8217;i bo\u015fluklar\u0131na ayr\u0131r.<\/td>\n<\/tr>\n<tr>\n<td width=\"154\">StopAnalyzer<\/td>\n<td width=\"628\">LetterTokenizer filtreleri ile LowerCaseFilter ve StopFilter&#8217;\u0131 i\u00e7erir.<\/td>\n<\/tr>\n<tr>\n<td width=\"154\">SimpleAnalyzer<\/td>\n<td width=\"628\">LetterTokenizer\u00a0ve LowerCaseFilter&#8217;\u0131 i\u00e7ermektedir.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<table width=\"782\">\n<tbody>\n<tr>\n<td width=\"154\"><strong>FILTERS<\/strong><\/td>\n<td width=\"628\"><strong>A\u00c7IKLAMA<\/strong><\/td>\n<\/tr>\n<tr>\n<td width=\"154\">StandardFilter<\/td>\n<td width=\"628\">Token&#8217;\u0131 normalle\u015ftirir. Yani kelimelerdeki k\u0131saltmalar veya belirte\u00e7leri kald\u0131r\u0131r. (C.E.O = CEO)<\/td>\n<\/tr>\n<tr>\n<td width=\"154\">LowerCaseFilter<\/td>\n<td width=\"628\">Token&#8217;\u0131 k\u00fc\u00e7\u00fck harflere \u00e7evirir.<\/td>\n<\/tr>\n<tr>\n<td width=\"154\">StopFilter<\/td>\n<td width=\"628\">Token \u00fczerindeki kelimeyi duraksat\u0131c\u0131 noktalama i\u015faretlerini kald\u0131r\u0131r.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>Ben \u00f6rne\u011fimizi <strong>StandardAnalyzer<\/strong> kullanarak ger\u00e7ekle\u015ftirdim. \u015eimdide gelelim LuceneEngine\u00a0class&#8217;\u0131m\u0131z\u0131n geriye kalan <strong>search<\/strong> metot&#8217;unun implementasyonuna.<\/p>\n<pre class=\"lang:c# decode:true \">        public List Search(string field, string keyword)\r\n        {\r\n            \/\/ \u00dczerinde arama yapmak istedi\u011fimiz field i\u00e7in bir query olu\u015fturuyoruz.\r\n            _QueryParser = new QueryParser(Lucene.Net.Util.Version.LUCENE_30, field, _Analyzer);\r\n            _Query = _QueryParser.Parse(keyword);\r\n\r\n            using (_IndexSearcher = new IndexSearcher(_Directory, true))\r\n            {\r\n                List products = new List();\r\n                var result = _IndexSearcher.Search(_Query, 10);\r\n\r\n                foreach (var loopDoc in result.ScoreDocs.OrderBy(s =&gt; s.Score))\r\n                {\r\n                    _Document = _IndexSearcher.Doc(loopDoc.Doc);\r\n\r\n                    products.Add(new Product() { Id = System.Convert.ToInt32(_Document.Get(\"Id\")), Name = _Document.Get(\"Name\") });\r\n                }\r\n\r\n                return products;\r\n            }\r\n        }<\/pre>\n<p>Indexlemi\u015f oldu\u011fumuz dok\u00fcman \u00fczerinde arama yapabilmek i\u00e7in bir <strong>QueryParser<\/strong> olu\u015fturuyoruz ve parametre olarak arama yapacak oldu\u011fu <strong>field<\/strong>&#8216;\u0131 ve arama yapma i\u015fleminde de kullanaca\u011f\u0131 <strong>analyzer<\/strong> tipini veriyoruz.<\/p>\n<blockquote><p>NOT: Dok\u00fcman\u0131 indexlerken kullanm\u0131\u015f oldu\u011funuz analyzer tipini, search i\u015fleminde de kullanman\u0131z <strong>gerekmektedir <\/strong>do\u011fru scoring alabilmek ve sonu\u00e7lar\u0131 elde edebilmek ad\u0131na. \u00d6rne\u011fin indexlerken kullanm\u0131\u015f oldu\u011funuz analyzer&#8217;in birinde <strong>StandardFilter<\/strong> oldu\u011funu d\u00fc\u015f\u00fcn\u00fcn. Hat\u0131rlarsan\u0131z noktalama i\u015faretlerini ve belirli k\u0131saltmalar\u0131 kald\u0131r\u0131yordu. (C.E.O = CEO) Arama i\u015fleminde ise <strong>StandardFilter<\/strong> olmad\u0131\u011f\u0131n\u0131 varsayarsak ve sizin search i\u00e7in keyword&#8217;\u00fcn\u00fcz e\u011fer C.E.O&#8217;ise <strong>o dok\u00fcman\u0131 bulamazs\u0131n\u0131z<\/strong>.<\/p><\/blockquote>\n<p>QueryParser&#8217;\u0131 initialize ettikten sonra ise <strong>Parse<\/strong> metotu ile<strong> Query<\/strong>&#8216;i elde ediyoruz. Daha sonra <strong>IndexSearcher<\/strong> s\u0131n\u0131f\u0131 \u00fczerinden tekrardan initialize ederken constructor\u00a0\u00fczerinden\u00a0index i\u015flemi i\u00e7in kullanm\u0131\u015f oldu\u011fumuz path&#8217;i belirtiyoruz ve <strong>Search<\/strong> metot&#8217;una olu\u015fan Query&#8217;i verip, ka\u00e7 adet sonu\u00e7 almak istedi\u011fimizi belirterek ilgili dok\u00fcmanlara ula\u015fabiliyoruz. En uygun sonu\u00e7lar\u0131 bize Lucene bir scoring de\u011ferleri olu\u015fturarak s\u0131ralay\u0131p veriyor.<\/p>\n<p>Search metotunuda olu\u015fturdu\u011fumuza g\u00f6re\u00a0LuceneEngine s\u0131n\u0131f\u0131m\u0131z\u0131n son hali a\u015fa\u011f\u0131daki gibi olacakt\u0131r.<\/p>\n<pre class=\"lang:c# decode:true \">using Lucene.Net.Analysis;\r\nusing Lucene.Net.Analysis.Standard;\r\nusing Lucene.Net.Documents;\r\nusing Lucene.Net.Index;\r\nusing Lucene.Net.QueryParsers;\r\nusing Lucene.Net.Search;\r\nusing Lucene.Net.Store;\r\nusing LuceneSearchEngine.Entities;\r\nusing System.Collections.Generic;\r\nusing System.Linq;\r\n\r\nnamespace LuceneSearchEngine\r\n{\r\n    public class LuceneEngine\r\n    {\r\n        private Analyzer _Analyzer;\r\n        private Directory _Directory;\r\n        private IndexWriter _IndexWriter;\r\n        private IndexSearcher _IndexSearcher;\r\n        private Document _Document;\r\n        private QueryParser _QueryParser;\r\n        private Query _Query;\r\n        private string _IndexPath = @\"C:\\LuceneIndex\";\r\n\r\n        public LuceneEngine()\r\n        {\r\n            _Analyzer = new StandardAnalyzer(Lucene.Net.Util.Version.LUCENE_30);\r\n            _Directory = FSDirectory.Open(_IndexPath);\r\n        }\r\n\r\n        public void AddToIndex(IEnumerable values)\r\n        {\r\n            using (_IndexWriter = new IndexWriter(_Directory, _Analyzer, IndexWriter.MaxFieldLength.UNLIMITED))\r\n            {\r\n                foreach (var loopEntity in values)\r\n                {\r\n                    _Document = new Document();\r\n\r\n                    foreach (var loopProperty in loopEntity.GetType().GetProperties())\r\n                    {\r\n                        \/\/ Dilersek indexlenmesini istemedi\u011fimiz bir alan varsa, kontrol ederek Field.Index.NO vermemiz yeterli olacakt\u0131r.\r\n                        _Document.Add(new Field(loopProperty.Name, loopProperty.GetValue(loopEntity).ToString(), Field.Store.YES, Field.Index.ANALYZED));\r\n\r\n                        _IndexWriter.AddDocument(_Document);\r\n                        _IndexWriter.Optimize();\r\n                        _IndexWriter.Commit();\r\n                    }\r\n                }\r\n            }\r\n        }\r\n\r\n        public List Search(string field, string keyword)\r\n        {\r\n            \/\/ \u00dczerinde arama yapmak istedi\u011fimiz field i\u00e7in bir query olu\u015fturuyoruz.\r\n            _QueryParser = new QueryParser(Lucene.Net.Util.Version.LUCENE_30, field, _Analyzer);\r\n            _Query = _QueryParser.Parse(keyword);\r\n\r\n            using (_IndexSearcher = new IndexSearcher(_Directory, true))\r\n            {\r\n                List products = new List();\r\n                var result = _IndexSearcher.Search(_Query, 10);\r\n\r\n                foreach (var loopDoc in result.ScoreDocs.OrderBy(s =&gt; s.Score))\r\n                {\r\n                    _Document = _IndexSearcher.Doc(loopDoc.Doc);\r\n\r\n                    products.Add(new Product() { Id = System.Convert.ToInt32(_Document.Get(\"Id\")), Name = _Document.Get(\"Name\") });\r\n                }\r\n\r\n                return products;\r\n            }\r\n        }\r\n    }\r\n}<\/pre>\n<p>Olu\u015fturmu\u015f oldu\u011fumuz engine&#8217;imizi \u015fimdi kullan\u0131m\u0131na bir bakal\u0131m.<\/p>\n<pre class=\"lang:c# decode:true\">using System.Collections.Generic;\r\nusing LuceneSearchEngine.Entities;\r\n\r\nnamespace LuceneSearchEngine\r\n{\r\n    class Program\r\n    {\r\n        static void Main(string[] args)\r\n        {\r\n            LuceneEngine engine = new LuceneEngine();\r\n            List products = new List();\r\n\r\n            products.Add(new Product() { Id = 1, Name = \"Apple Iphone 6\" });\r\n            products.Add(new Product() { Id = 2, Name = \"MacBook Air\" });\r\n            products.Add(new Product() { Id = 3, Name = \"Sony Xperia Z Ultra\" });\r\n            products.Add(new Product() { Id = 4, Name = \"Samsung Ultra HD Tv\" });\r\n            products.Add(new Product() { Id = 5, Name = \"Asus Zenphone 6\" });\r\n            products.Add(new Product() { Id = 6, Name = \"Sony Xperia Z 3\" });\r\n            products.Add(new Product() { Id = 7, Name = \"Sony Playstation 3\" });\r\n\r\n            \/\/ Olu\u015fturmu\u015f oldu\u011fumuz test dok\u00fcmanlar\u0131n\u0131 ilgili indexleme metotumuza g\u00f6nderelim ve indexlesin. Bu metotu sadece bir kere \u00e7al\u0131\u015ft\u0131rmam\u0131z yeterlidir, daha sonras\u0131nda ise kapatabilirsiniz.\r\n            engine.AddToIndex(products);\r\n\r\n            \/\/ Olu\u015fturmu\u015f oldu\u011fumuz index \u00fczerinden Name field'\u0131na bakarak ve i\u00e7erisinde \"Sony\" ge\u00e7en en uygun kelimeleri scoring i\u015flemi yaparak bize getirecektir.\r\n            var result = engine.Search(\"Name\", \"Sony\");\r\n        }\r\n    }\r\n}\r\n<\/pre>\n<p>\u00d6rnek gere\u011fi b\u00fcy\u00fck veriler \u00fczerinde \u00e7al\u0131\u015famad\u0131m ama e\u011fer sizler b\u00fcy\u00fck boyutlu verilere sahipseniz kesinlikle tavsiye edebilece\u011fim bir k\u00fct\u00fcphanedir <em>Lucene<\/em> search engine olarak.<\/p>\n<p>Harika \u00f6zelliklerinin aksine k\u00f6t\u00fc olarak nitelendirebilece\u011fim tek yan\u0131 ise <strong>distributed<\/strong> (da\u011f\u0131t\u0131k) olarak indexlemeye izin vermemektedir ve arama yapamamaktad\u0131r. Fakat bu tarz i\u015fler i\u00e7in geli\u015ftirilmi\u015f olan <strong>Katta<\/strong> isimli teknoloji ile indexler da\u011f\u0131t\u0131k olarak kullan\u0131labilir ve search i\u015flemi de yap\u0131labilmektedir.<\/p>\n<p>Katta&#8217;n\u0131n workflow&#8217;u hakk\u0131nda bilgi edinmek isterseniz <a href=\"http:\/\/katta.sourceforge.net\/about\">buray\u0131<\/a> ziyaret edebilirsiniz. Bunun d\u0131\u015f\u0131nda bunlarla u\u011fra\u015fmak istemezseniz ve kompleks \u015fekilde sorgular at\u0131p (Scoring i\u015flemleri, Facets&#8217;ler, Auto Suggestorler gibi.) distributed bir search engine kullanmak istiyorum derseniz<strong>\u00a0ElasticSearch<\/strong>&#8216;\u00fc \u00f6nerebilirim bu noktada. <strong>Solr<\/strong>&#8216;\u0131da es ge\u00e7memek gerek tabiki.<\/p>\n<p>Aktif olarak \u015fuan <em>ElasticSearch<\/em> ile \u00e7al\u0131\u015fmaktay\u0131m bulundu\u011fum \u015firkette. Elastic \u00fczerinde farkl\u0131 development i\u015flemleri ger\u00e7ekle\u015ftirmekteyim. <em>ElasticSearch<\/em> de altyap\u0131s\u0131nda <em>Lucene<\/em> engine&#8217;i kullanmaktad\u0131r ayr\u0131ca distributed olarak indexleme ve arama i\u015flemlerini de desteklemektedir.<\/p>\n<p>Umar\u0131m faydal\u0131 bir makale olmu\u015ftur. \u00d6rnek proje ektedir.<\/p>\n<p>Herkese iyi search&#8217;ler :)<\/p>\n<p><a href=\"\/wp-content\/uploads\/2015\/10\/LuceneSearchEngine.rar\">LuceneSearchEngine<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Merhaba arkada\u015flar, uzun bir aradan sonra kar\u015f\u0131n\u0131za g\u00fczel bir k\u00fct\u00fcphane incelemesi ile geliyorum. G\u00fcn\u00fcm\u00fczde yayg\u0131nla\u015fan teknoloji ile art\u0131k ciddi anlamda b\u00fcy\u00fck boyutlu veriler ile \u00e7al\u0131\u015fmaktay\u0131z. Zaman zaman bir e-ticaret projesindeki \u00fcr\u00fcnlerin \u00e7oklu\u011funu d\u00fc\u015f\u00fcn\u00fcn veya bir sosyal platform sitesini. \u00d6z\u00fcnde geli\u015ftirmi\u015f oldu\u011fumuz uygulamalarda hepimiz search i\u015flemi&#8230;<\/p>\n<div class=\"more-link-wrapper\"><a class=\"more-link\" href=\"https:\/\/gokhan-gokalp.com\/tr\/lucene-net-search-engine-kutuphanesi-kullanimi\/\">Devam\u0131n\u0131 okuyun<span class=\"screen-reader-text\">Lucene.Net Search Engine K\u00fct\u00fcphanesi Kullan\u0131m\u0131<\/span><\/a><\/div>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5,193],"tags":[135,137,132,136,134,133],"class_list":["post-459","post","type-post","status-publish","format-standard","hentry","category-net","category-search-engine","tag-c-lucene","tag-c-search-engine","tag-lucene","tag-lucene-nedir","tag-lucene-search","tag-lucene-net","entry"],"translation":{"provider":"WPGlobus","version":"3.0.2","language":"tr","enabled_languages":["en","tr"],"languages":{"en":{"title":true,"content":true,"excerpt":false},"tr":{"title":false,"content":false,"excerpt":false}}},"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.3 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Lucene.Net Search Engine K\u00fct\u00fcphanesi Kullan\u0131m\u0131 - G\u00f6khan G\u00f6kalp<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/gokhan-gokalp.com\/lucene-net-search-engine-kutuphanesi-kullanimi\/\" \/>\n<meta property=\"og:locale\" content=\"tr_TR\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Lucene.Net Search Engine K\u00fct\u00fcphanesi Kullan\u0131m\u0131 - G\u00f6khan G\u00f6kalp\" \/>\n<meta property=\"og:url\" content=\"https:\/\/gokhan-gokalp.com\/lucene-net-search-engine-kutuphanesi-kullanimi\/\" \/>\n<meta property=\"og:site_name\" content=\"G\u00f6khan G\u00f6kalp\" \/>\n<meta property=\"article:published_time\" content=\"2015-10-22T22:12:10+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2019-05-16T06:09:03+00:00\" \/>\n<meta name=\"author\" content=\"G\u00f6khan G\u00f6kalp\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Yazan:\" \/>\n\t<meta name=\"twitter:data1\" content=\"G\u00f6khan G\u00f6kalp\" \/>\n\t<meta name=\"twitter:label2\" content=\"Tahmini okuma s\u00fcresi\" \/>\n\t<meta name=\"twitter:data2\" content=\"9 dakika\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/gokhan-gokalp.com\\\/lucene-net-search-engine-kutuphanesi-kullanimi\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/gokhan-gokalp.com\\\/lucene-net-search-engine-kutuphanesi-kullanimi\\\/\"},\"author\":{\"name\":\"G\u00f6khan G\u00f6kalp\",\"@id\":\"https:\\\/\\\/gokhan-gokalp.com\\\/#\\\/schema\\\/person\\\/7e2a7fa98babd22a5fdae563c4b8cdbe\"},\"headline\":\"Lucene.Net Search Engine K\u00fct\u00fcphanesi Kullan\u0131m\u0131\",\"datePublished\":\"2015-10-22T22:12:10+00:00\",\"dateModified\":\"2019-05-16T06:09:03+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/gokhan-gokalp.com\\\/lucene-net-search-engine-kutuphanesi-kullanimi\\\/\"},\"wordCount\":1112,\"commentCount\":7,\"publisher\":{\"@id\":\"https:\\\/\\\/gokhan-gokalp.com\\\/#\\\/schema\\\/person\\\/7e2a7fa98babd22a5fdae563c4b8cdbe\"},\"keywords\":[\"C# Lucene\",\"C# Search Engine\",\"Lucene\",\"Lucene nedir\",\"Lucene Search\",\"Lucene.Net\"],\"articleSection\":[\".NET\",\"Search Engine\"],\"inLanguage\":\"tr\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/gokhan-gokalp.com\\\/lucene-net-search-engine-kutuphanesi-kullanimi\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/gokhan-gokalp.com\\\/lucene-net-search-engine-kutuphanesi-kullanimi\\\/\",\"url\":\"https:\\\/\\\/gokhan-gokalp.com\\\/lucene-net-search-engine-kutuphanesi-kullanimi\\\/\",\"name\":\"Lucene.Net Search Engine K\u00fct\u00fcphanesi Kullan\u0131m\u0131 - G\u00f6khan G\u00f6kalp\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/gokhan-gokalp.com\\\/#website\"},\"datePublished\":\"2015-10-22T22:12:10+00:00\",\"dateModified\":\"2019-05-16T06:09:03+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/gokhan-gokalp.com\\\/lucene-net-search-engine-kutuphanesi-kullanimi\\\/#breadcrumb\"},\"inLanguage\":\"tr\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/gokhan-gokalp.com\\\/lucene-net-search-engine-kutuphanesi-kullanimi\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/gokhan-gokalp.com\\\/lucene-net-search-engine-kutuphanesi-kullanimi\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/gokhan-gokalp.com\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Lucene.Net Search Engine K\u00fct\u00fcphanesi Kullan\u0131m\u0131\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/gokhan-gokalp.com\\\/#website\",\"url\":\"https:\\\/\\\/gokhan-gokalp.com\\\/\",\"name\":\"G\u00f6khan G\u00f6kalp\",\"description\":\"C# &amp; Python lover\",\"publisher\":{\"@id\":\"https:\\\/\\\/gokhan-gokalp.com\\\/#\\\/schema\\\/person\\\/7e2a7fa98babd22a5fdae563c4b8cdbe\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/gokhan-gokalp.com\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"tr\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\\\/\\\/gokhan-gokalp.com\\\/#\\\/schema\\\/person\\\/7e2a7fa98babd22a5fdae563c4b8cdbe\",\"name\":\"G\u00f6khan G\u00f6kalp\",\"pronouns\":\"he\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"tr\",\"@id\":\"https:\\\/\\\/gokhan-gokalp.com\\\/wp-content\\\/litespeed\\\/avatar\\\/e645f66b6264ced10d7b6d8b1f85509b.jpg?ver=1776775506\",\"url\":\"https:\\\/\\\/gokhan-gokalp.com\\\/wp-content\\\/litespeed\\\/avatar\\\/e645f66b6264ced10d7b6d8b1f85509b.jpg?ver=1776775506\",\"contentUrl\":\"https:\\\/\\\/gokhan-gokalp.com\\\/wp-content\\\/litespeed\\\/avatar\\\/e645f66b6264ced10d7b6d8b1f85509b.jpg?ver=1776775506\",\"caption\":\"G\u00f6khan G\u00f6kalp\"},\"logo\":{\"@id\":\"https:\\\/\\\/gokhan-gokalp.com\\\/wp-content\\\/litespeed\\\/avatar\\\/e645f66b6264ced10d7b6d8b1f85509b.jpg?ver=1776775506\"},\"sameAs\":[\"https:\\\/\\\/gokhan-gokalp.com\"],\"url\":\"https:\\\/\\\/gokhan-gokalp.com\\\/tr\\\/author\\\/gok-gokalp\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Lucene.Net Search Engine K\u00fct\u00fcphanesi Kullan\u0131m\u0131 - G\u00f6khan G\u00f6kalp","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/gokhan-gokalp.com\/lucene-net-search-engine-kutuphanesi-kullanimi\/","og_locale":"tr_TR","og_type":"article","og_title":"Lucene.Net Search Engine K\u00fct\u00fcphanesi Kullan\u0131m\u0131 - G\u00f6khan G\u00f6kalp","og_url":"https:\/\/gokhan-gokalp.com\/lucene-net-search-engine-kutuphanesi-kullanimi\/","og_site_name":"G\u00f6khan G\u00f6kalp","article_published_time":"2015-10-22T22:12:10+00:00","article_modified_time":"2019-05-16T06:09:03+00:00","author":"G\u00f6khan G\u00f6kalp","twitter_card":"summary_large_image","twitter_misc":{"Yazan:":"G\u00f6khan G\u00f6kalp","Tahmini okuma s\u00fcresi":"9 dakika"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/gokhan-gokalp.com\/lucene-net-search-engine-kutuphanesi-kullanimi\/#article","isPartOf":{"@id":"https:\/\/gokhan-gokalp.com\/lucene-net-search-engine-kutuphanesi-kullanimi\/"},"author":{"name":"G\u00f6khan G\u00f6kalp","@id":"https:\/\/gokhan-gokalp.com\/#\/schema\/person\/7e2a7fa98babd22a5fdae563c4b8cdbe"},"headline":"Lucene.Net Search Engine K\u00fct\u00fcphanesi Kullan\u0131m\u0131","datePublished":"2015-10-22T22:12:10+00:00","dateModified":"2019-05-16T06:09:03+00:00","mainEntityOfPage":{"@id":"https:\/\/gokhan-gokalp.com\/lucene-net-search-engine-kutuphanesi-kullanimi\/"},"wordCount":1112,"commentCount":7,"publisher":{"@id":"https:\/\/gokhan-gokalp.com\/#\/schema\/person\/7e2a7fa98babd22a5fdae563c4b8cdbe"},"keywords":["C# Lucene","C# Search Engine","Lucene","Lucene nedir","Lucene Search","Lucene.Net"],"articleSection":[".NET","Search Engine"],"inLanguage":"tr","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/gokhan-gokalp.com\/lucene-net-search-engine-kutuphanesi-kullanimi\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/gokhan-gokalp.com\/lucene-net-search-engine-kutuphanesi-kullanimi\/","url":"https:\/\/gokhan-gokalp.com\/lucene-net-search-engine-kutuphanesi-kullanimi\/","name":"Lucene.Net Search Engine K\u00fct\u00fcphanesi Kullan\u0131m\u0131 - G\u00f6khan G\u00f6kalp","isPartOf":{"@id":"https:\/\/gokhan-gokalp.com\/#website"},"datePublished":"2015-10-22T22:12:10+00:00","dateModified":"2019-05-16T06:09:03+00:00","breadcrumb":{"@id":"https:\/\/gokhan-gokalp.com\/lucene-net-search-engine-kutuphanesi-kullanimi\/#breadcrumb"},"inLanguage":"tr","potentialAction":[{"@type":"ReadAction","target":["https:\/\/gokhan-gokalp.com\/lucene-net-search-engine-kutuphanesi-kullanimi\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/gokhan-gokalp.com\/lucene-net-search-engine-kutuphanesi-kullanimi\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/gokhan-gokalp.com\/"},{"@type":"ListItem","position":2,"name":"Lucene.Net Search Engine K\u00fct\u00fcphanesi Kullan\u0131m\u0131"}]},{"@type":"WebSite","@id":"https:\/\/gokhan-gokalp.com\/#website","url":"https:\/\/gokhan-gokalp.com\/","name":"G\u00f6khan G\u00f6kalp","description":"C# &amp; Python lover","publisher":{"@id":"https:\/\/gokhan-gokalp.com\/#\/schema\/person\/7e2a7fa98babd22a5fdae563c4b8cdbe"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/gokhan-gokalp.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"tr"},{"@type":["Person","Organization"],"@id":"https:\/\/gokhan-gokalp.com\/#\/schema\/person\/7e2a7fa98babd22a5fdae563c4b8cdbe","name":"G\u00f6khan G\u00f6kalp","pronouns":"he","image":{"@type":"ImageObject","inLanguage":"tr","@id":"https:\/\/gokhan-gokalp.com\/wp-content\/litespeed\/avatar\/e645f66b6264ced10d7b6d8b1f85509b.jpg?ver=1776775506","url":"https:\/\/gokhan-gokalp.com\/wp-content\/litespeed\/avatar\/e645f66b6264ced10d7b6d8b1f85509b.jpg?ver=1776775506","contentUrl":"https:\/\/gokhan-gokalp.com\/wp-content\/litespeed\/avatar\/e645f66b6264ced10d7b6d8b1f85509b.jpg?ver=1776775506","caption":"G\u00f6khan G\u00f6kalp"},"logo":{"@id":"https:\/\/gokhan-gokalp.com\/wp-content\/litespeed\/avatar\/e645f66b6264ced10d7b6d8b1f85509b.jpg?ver=1776775506"},"sameAs":["https:\/\/gokhan-gokalp.com"],"url":"https:\/\/gokhan-gokalp.com\/tr\/author\/gok-gokalp\/"}]}},"_links":{"self":[{"href":"https:\/\/gokhan-gokalp.com\/tr\/wp-json\/wp\/v2\/posts\/459","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/gokhan-gokalp.com\/tr\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/gokhan-gokalp.com\/tr\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/gokhan-gokalp.com\/tr\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/gokhan-gokalp.com\/tr\/wp-json\/wp\/v2\/comments?post=459"}],"version-history":[{"count":15,"href":"https:\/\/gokhan-gokalp.com\/tr\/wp-json\/wp\/v2\/posts\/459\/revisions"}],"predecessor-version":[{"id":2730,"href":"https:\/\/gokhan-gokalp.com\/tr\/wp-json\/wp\/v2\/posts\/459\/revisions\/2730"}],"wp:attachment":[{"href":"https:\/\/gokhan-gokalp.com\/tr\/wp-json\/wp\/v2\/media?parent=459"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/gokhan-gokalp.com\/tr\/wp-json\/wp\/v2\/categories?post=459"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/gokhan-gokalp.com\/tr\/wp-json\/wp\/v2\/tags?post=459"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}