Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
eecs398-search
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
vcday
eecs398-search
Commits
9c02e3df
Commit
9c02e3df
authored
6 years ago
by
jsclose
Browse files
Options
Downloads
Patches
Plain Diff
changed name of query to searcher
parent
acf23581
No related branches found
No related tags found
1 merge request
!8
Origin/constraint solver
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
CMakeLists.txt
+1
-1
1 addition, 1 deletion
CMakeLists.txt
query/Ranker/Ranker.cpp
+0
-1
0 additions, 1 deletion
query/Ranker/Ranker.cpp
query/Searcher.cpp
+15
-4
15 additions, 4 deletions
query/Searcher.cpp
query/Searcher.h
+30
-0
30 additions, 0 deletions
query/Searcher.h
search.cpp
+1
-1
1 addition, 1 deletion
search.cpp
with
47 additions
and
7 deletions
CMakeLists.txt
+
1
−
1
View file @
9c02e3df
...
...
@@ -157,7 +157,7 @@ add_executable(URLTEST
)
add_executable
(
search-engine search.cpp query/
Qu
er
y
.cpp
)
add_executable
(
search-engine search.cpp query/
Search
er.cpp
)
add_executable
(
ISRWord-tests
util/util.cpp
...
...
This diff is collapsed.
Click to expand it.
query/Ranker/Ranker.cpp
+
0
−
1
View file @
9c02e3df
...
...
@@ -32,7 +32,6 @@ vector< string > Ranker::rank ( )
vector
<
DocumentEnding
>
docEnds
;
set
<
string
>
urls
;
for
(
auto
queryWord
=
inputQuery
.
begin
();
queryWord
<
inputQuery
.
end
();
++
queryWord
)
{
while
(
queryWord
->
getCurrentLocation
(
)
!=
MAX_Location
)
...
...
This diff is collapsed.
Click to expand it.
query/
Qu
er
y
.cpp
→
query/
Search
er.cpp
+
15
−
4
View file @
9c02e3df
...
...
@@ -2,7 +2,7 @@
// Created by Jake Close on 3/7/18.
//
#include
"
Qu
er
y
.h"
#include
"
Search
er.h"
#include
<iostream>
using
namespace
std
;
...
...
@@ -13,19 +13,30 @@ using namespace std;
*
*/
void
QueryPars
er
::
search
(
)
void
Search
er
::
search
(
)
{
if
(
strcmp
(
CompleteQuery
,
"-quit"
)
==
0
)
if
(
*
CompleteQuery
==
"-quit"
||*
CompleteQuery
==
"-q"
)
{
cout
<<
"Thank you for using C++lue search engine"
<<
endl
;
exit
(
0
);
}
else
if
(
strcmp
(
CompleteQuery
,
"-help"
)
==
0
)
else
if
(
*
CompleteQuery
==
"-help"
)
{
cout
<<
"Manual"
<<
endl
;
return
;
}
else
{
queryParser
.
parse
(
*
CompleteQuery
);
container
->
compile
(
queryParser
);
container
->
solve
(
);
}
return
;
...
...
This diff is collapsed.
Click to expand it.
query/
Qu
er
y
.h
→
query/
Search
er.h
+
30
−
0
View file @
9c02e3df
...
...
@@ -2,15 +2,17 @@
// Created by Jake Close on 3/7/18.
//
#include
"/query/queryLanguage/QueryParser.h"
#include
"/constraintSolver/ISRContainer.h"
#pragma once
using
namespace
std
;
class
QueryPars
er
class
Search
er
{
public:
QueryParser
(
const
char
*
query_in
)
:
CompleteQuery
(
query_in
)
Searcher
(
string
*
query_in
)
:
CompleteQuery
(
query_in
)
{
};
void
search
(
);
...
...
@@ -18,7 +20,10 @@ public:
void
printResults
(
);
private
:
const
char
*
CompleteQuery
;
string
*
CompleteQuery
;
QueryParser
queryParser
;
ISRContainer
*
container
;
};
...
...
This diff is collapsed.
Click to expand it.
search.cpp
+
1
−
1
View file @
9c02e3df
...
...
@@ -5,7 +5,7 @@
#include
<iostream>
#include
<stdlib.h>
#include
<unistd.h>
#include
"query/
Qu
er
y
.h"
#include
"query/
Search
er.h"
using
namespace
std
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment