private LuceneQueryModel PrepareQuery(QueryModel queryModel)
        {
            QueryModelTransformer.TransformQueryModel(queryModel);

            var builder = new QueryModelTranslator(this, context);

            builder.Build(queryModel);

            Log.Debug(() => string.Format("Lucene query: {0}", builder.Model));

            return(builder.Model);
        }
Exemple #2
0
        private LuceneQueryModel PrepareQuery(QueryModel queryModel)
        {
            QueryModelTransformer.TransformQueryModel(queryModel);

            var builder = new QueryModelTranslator(this);

            builder.Build(queryModel);

            Log.Debug(m => m("Lucene query: {0}", builder.Model));

            return(builder.Model);
        }
Exemple #3
0
        public void SetUp()
        {
            mappingInfo = MockRepository.GenerateStub <IFieldMappingInfoProvider>();

            transformer = new QueryModelTranslator(new Context(new RAMDirectory(), new WhitespaceAnalyzer(), Version.LUCENE_29, null, new object()), mappingInfo);

            numericMappingInfo = MockRepository.GenerateStub <IFieldMappingInfo>();
            numericMappingInfo.Stub(i => i.IsNumericField).Return(true);
            numericMappingInfo.Stub(i => i.SortFieldType).Return(SortField.LONG);

            nonNumericMappingInfo = MockRepository.GenerateStub <IFieldMappingInfo>();
            nonNumericMappingInfo.Stub(i => i.IsNumericField).Return(false);
            nonNumericMappingInfo.Stub(i => i.SortFieldType).Return(SortField.STRING);
        }
Exemple #4
0
        public void SetUp()
        {
            mappingProvider = MockRepository.GenerateStub <IFieldMappingInfoProvider>();

            transformer = new QueryModelTranslator(mappingProvider);
        }
Exemple #5
0
 public void SetUp()
 {
     mappingProvider = MockRepository.GenerateStub <IFieldMappingInfoProvider>();
     context         = new Context(new RAMDirectory(), new object());
     transformer     = new QueryModelTranslator(mappingProvider, context);
 }